Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Readers.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/MockResolutionGui.java38
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java66
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ParsersSuite.java11
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaDataTest.java47
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordMlResolutionGuiTest.java92
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/BootStrapUser.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java27
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java101
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaData.java69
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java16
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java153
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java13
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ArtifactImportWizardTest.java59
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ImportTestSuite.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyleTest.java180
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case1.xml3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case2.xml3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case3.xml3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java80
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationParameter.java2
26 files changed, 658 insertions, 338 deletions
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java
index ba404ef50f5..8d5d4db4b4e 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java
@@ -384,7 +384,7 @@ public class PopulateDemoActions extends XNavigateItemAction {
importOptions.setExtractor(extractor);
importOptions.setResolver(artifactResolver);
- IOperation operation = ArtifactImportOperationFactory.createOperation(importOptions);
+ IOperation operation = ArtifactImportOperationFactory.completeOperation(importOptions);
Operations.executeWorkAndCheckStatus(operation);
// Validate that something was imported
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Readers.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Readers.java
index 6f9987c918e..fa41ac4800e 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Readers.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Readers.java
@@ -42,7 +42,7 @@ public final class Readers {
final String EMPTY_TAG = "<" + elementName + "/>";
final String OPEN_TAG = "<" + elementName + ">";
final String OPEN_TAG_WITH_ATTR = "<" + elementName + " ";
- final CharSequence[] TAGS = new CharSequence[] {CLOSE_TAG, EMPTY_TAG, OPEN_TAG, OPEN_TAG_WITH_ATTR};
+ final CharSequence[] TAGS = {CLOSE_TAG, EMPTY_TAG, OPEN_TAG, OPEN_TAG_WITH_ATTR};
int elementDepthCount = 1;
StringBuilder read = null;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/MockResolutionGui.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/MockResolutionGui.java
deleted file mode 100644
index 6c5930428b3..00000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/MockResolutionGui.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.skynet.core.importing.parsers;
-
-import java.util.Collection;
-
-import org.eclipse.osee.framework.skynet.core.importing.parsers.WordOutlineExtractorDelegate.ContentType;
-import org.eclipse.osee.framework.skynet.core.importing.parsers.WordOutlineExtractorDelegate.IConflictResolvingGui;
-
-public final class MockResolutionGui implements IConflictResolvingGui {
-
- private ContentType resultingEnum;
-
- public MockResolutionGui() {
- this.resultingEnum = null;
- }
-
- public MockResolutionGui(ContentType resultingEnum) {
- this.resultingEnum = resultingEnum;
- }
-
- public void setMockUserAnswer(ContentType resultingEnum) {
- this.resultingEnum = resultingEnum;
- }
-
- @Override
- public ContentType determineContentType(Collection<String> paramList) {
- return resultingEnum;
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java
index 021fbdcc751..126b9e9eeff 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java
@@ -10,6 +10,10 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.importing.parsers;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.osee.framework.skynet.core.importing.ReqNumbering;
import org.junit.Assert;
import org.junit.Test;
@@ -20,8 +24,6 @@ import org.junit.Test;
*/
public final class OutlineResolutionAndNumberTest {
- //TODO: change to parameterized type test
-
private static final String LAST_OUTLINE_NUMBER = "3.1.1.2.1.7"; /* realistic outline number */
private final OutlineResolution outlineResolution = new OutlineResolution();
@@ -70,4 +72,64 @@ public final class OutlineResolutionAndNumberTest {
Assert.assertFalse(outlineResolution.isInvalidOutlineNumber("2.1.2", "2.1.1.1.1"));
Assert.assertTrue(outlineResolution.isInvalidOutlineNumber("3.2", "2.1.1.1.1"));
}
+
+ @Test
+ public void testNextSetGeneration() {
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering(LAST_OUTLINE_NUMBER));
+ Set<String> expected =
+ new HashSet<String>(Arrays.asList("3.2", "3.1.2", "3.1.1.3", "3.1.1.2.2", "3.1.1.2.1.8", "4.", "4.0",
+ "3.1.1.2.1.7.1", "3.1.1.2.1.7.0.1"));
+ Assert.assertEquals(expected, nextPossibleSet);
+ }
+
+ @Test
+ public void testNextSetGeneration_NonZeroBased() {
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1."));
+ Set<String> expected = new HashSet<String>(Arrays.asList("2.", "2.0", "1.1", "1.0.1"));
+ Assert.assertEquals(expected, nextPossibleSet);
+ }
+
+ @Test
+ public void testNextSetGeneration_ZeroBased() {
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.0"));
+ Set<String> expected = new HashSet<String>(Arrays.asList("2.", "2.0", "1.1", "1.0.1"));
+ Assert.assertEquals(expected, nextPossibleSet);
+ }
+
+ @Test
+ public void testNextSetGeneration_ZeroExtendedBased() {
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.0.1"));
+ Set<String> expected = new HashSet<String>(Arrays.asList("2.", "2.0", "1.1", "1.0.2"));
+ Assert.assertEquals(expected, nextPossibleSet);
+ }
+
+ @Test
+ public void testNextSetGeneration_DoubleDigitZeroBased() {
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.0.10"));
+ Set<String> expected = new HashSet<String>(Arrays.asList("2.", "2.0", "1.1", "1.0.11", "1.0.10.1", "1.0.10.0.1"));
+ Assert.assertEquals(expected, nextPossibleSet);
+ }
+
+ @Test
+ public void testNextSetGeneration_DoubleDigitHigherBased() {
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.23"));
+ Set<String> expected = new HashSet<String>(Arrays.asList("2.", "2.0", "1.24", "1.23.1", "1.23.0.1"));
+ Assert.assertEquals(expected, nextPossibleSet);
+ }
+
+ @Test
+ public void testNextSetGeneration_SubItems() {
+ String current = "1.23.1.1";
+ Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.23"));
+ Assert.assertFalse(nextPossibleSet.contains(current));
+
+ boolean larger_NotGenerated_CorrectInvalid = outlineResolution.isInvalidOutlineNumber(current, "1.23");
+ Assert.assertFalse(larger_NotGenerated_CorrectInvalid);
+
+ larger_NotGenerated_CorrectInvalid = outlineResolution.isInvalidOutlineNumber("1.23.1.10", "1.23");
+ Assert.assertFalse(larger_NotGenerated_CorrectInvalid);
+
+ larger_NotGenerated_CorrectInvalid = outlineResolution.isInvalidOutlineNumber("1.23.1.0.0.0.1", "1.23");
+ Assert.assertFalse(larger_NotGenerated_CorrectInvalid);
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ParsersSuite.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ParsersSuite.java
index 957d31a05ac..83a0e6f2813 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ParsersSuite.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ParsersSuite.java
@@ -14,12 +14,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ //
-WordMLExtractorDelegateTableOfContentsTest.class, //
- WordOutlineTest.class, //
- OutlineResolutionAndNumberTest.class, //
- WordMlResolutionGuiTest.class, //
-})
+@Suite.SuiteClasses({
+ WordMLExtractorDelegateTableOfContentsTest.class,
+ WordOutlineTest.class,
+ OutlineResolutionAndNumberTest.class,
+ RoughArtifactMetaDataTest.class})
public class ParsersSuite {
// do nothing
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaDataTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaDataTest.java
new file mode 100644
index 00000000000..d6ef34d6b94
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaDataTest.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.skynet.core.importing.parsers;
+
+import junit.framework.Assert;
+import org.junit.Test;
+
+/**
+ * Test Case for {@link RoughArtifactMetaData}
+ *
+ * @author Karol M. Wilk
+ */
+public final class RoughArtifactMetaDataTest {
+
+ private static final String headingStyle = "Heading2";
+
+ @Test
+ public void testRegParagraph() {
+ Assert.assertTrue(RoughArtifactMetaData.matches(headingStyle, "Heading2"));
+ Assert.assertTrue(RoughArtifactMetaData.matches(headingStyle, "Heading3"));
+ Assert.assertTrue(RoughArtifactMetaData.matches(headingStyle, "Heading4"));
+ }
+
+ @Test
+ public void testIrregularCase() {
+ Assert.assertFalse(RoughArtifactMetaData.matches(headingStyle, "bltlvl1"));
+ Assert.assertFalse(RoughArtifactMetaData.matches(headingStyle, "Normal"));
+ Assert.assertTrue(RoughArtifactMetaData.matches(headingStyle, "Heading3"));
+ }
+
+ @Test
+ public void testConfidenceCase() {
+ String headingStyle = "0123456789";
+ boolean paragraphStyleAre_80perc_TheSame = RoughArtifactMetaData.matches(headingStyle, "01234567xx"); //xx for same length check
+ Assert.assertTrue(paragraphStyleAre_80perc_TheSame);
+ paragraphStyleAre_80perc_TheSame = RoughArtifactMetaData.matches(headingStyle, "0123456xxx");
+ Assert.assertFalse(paragraphStyleAre_80perc_TheSame);
+ }
+}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordMlResolutionGuiTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordMlResolutionGuiTest.java
deleted file mode 100644
index 1820d7836bf..00000000000
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordMlResolutionGuiTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.skynet.core.importing.parsers;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact;
-import org.eclipse.osee.framework.skynet.core.importing.RoughArtifactKind;
-import org.eclipse.osee.framework.skynet.core.importing.operations.RoughArtifactCollector;
-import org.eclipse.osee.framework.skynet.core.importing.parsers.WordOutlineExtractorDelegate.ContentType;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * <p>
- * Tests by inputing the whole requirements sample ICD file.<br/>
- * Tests:<br/>
- * <li>if user answers store as content vs store as an outline number, depending on what user selects.</li>
- * </p>
- * <p>
- * <br/>
- * THESE TESTS MUST RUN AS PART OF THE SUITE, RoughArtifact* classes need the osee caching service.<br/>
- * </p>
- *
- * @author Karol M. Wilk
- */
-public class WordMlResolutionGuiTest {
-
- private static final Pattern PARAGRAPH_REGEX = Pattern.compile("<w:p[ >].*?</w:p>", Pattern.DOTALL);
-
- private static final String FILE_INPUT = "outlineResolutionCausingInput_no_toc_formatted.xml";
-
- private WordOutlineExtractorDelegate delegate = null;
-
- public WordMlResolutionGuiTest() {
- delegate = new WordOutlineExtractorDelegate(new MockResolutionGui());
- }
-
- @Test
- public void uiResolutionTests() throws Exception {
- //init some ds in delegate
- delegate.initialize();
-
- //TODO: not finished, needs to be able to compare resulting rough artifact to data
- RoughArtifact testRoughArtifactParent = new RoughArtifact(RoughArtifactKind.CONTAINER);
- new RoughArtifactCollector(testRoughArtifactParent);
-
- MockResolutionGui resolvingGui = (MockResolutionGui) delegate.getOutlineResolvingUi();
- //as if the user selected content
- //if asked answer No, treat questions as content
- resolvingGui.setMockUserAnswer(ContentType.CONTENT);
-
- //pre load with some real data
- String rawData = Lib.fileToString(getClass(), FILE_INPUT);
- Matcher matcher = PARAGRAPH_REGEX.matcher(rawData);
- boolean foundSomething = false;
- matcher.find();//skip 1.0
- matcher.find();//skip 1.1
- //read the 3.1
- if (matcher.find()) {
- foundSomething = true;
- String singleWp = matcher.group();
- //TODO: pass in the real testCollector
- delegate.processContent(null, null, false, false, null, null, null, singleWp, false);
- }
-
- //TODO:
- //because this case puts stuff into content
- //there should be a node containing 'Meters and 5.4 Meters'
- //i.e. testRoughArtifactParent.getContent().equals( "Meters and 5.4 Meters" );
-
- Assert.assertTrue(foundSomething);
- }
-
- @After
- public void testCleanup() {
- delegate.dispose();
- Assert.assertNull(delegate.getLastHeaderNumber());
- Assert.assertNull(delegate.getLastHeaderName());
- Assert.assertNull(delegate.getLastContent());
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/BootStrapUser.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/BootStrapUser.java
index 3666db7fd7e..3b4c4e30921 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/BootStrapUser.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/BootStrapUser.java
@@ -35,6 +35,7 @@ public class BootStrapUser extends User {
return instance;
}
+ @SuppressWarnings("unused")
private static final long serialVersionUID = 1L;
@Override
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index e9caccc2b77..eb56315a1d4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -1026,8 +1026,31 @@ public class Artifact extends NamedIdentity<String> implements IArtifact, IAdapt
transaction.execute();
}
- public final void persist(SkynetTransaction transaction) throws OseeCoreException {
- transaction.addArtifact(this);
+ /**
+ * <b>THIS ASSUMES YOU ARE MAINTAINING YOUR OWN TRANSACTION</b> vs {@link #SkynetTransaction.persist(String)} where
+ * silently you are provided a transaction.
+ * <p>
+ * Example:
+ *
+ * <pre>
+ * ...
+ * Artifact artifact = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, ARTIFACT_BRANCH);
+ * ...
+ * <b>SkynetTransaction transaction = TransactionManager.createTransaction(ARTIFACT_BRANCH, name);</b>
+ * ...
+ * <b>artifact.persist(transaction);</b>
+ * ...
+ * <b>transaction.execute();</b>
+ * ...
+ * </pre>
+ *
+ * </p>
+ *
+ * @param managedTransaction
+ * @throws OseeCoreException
+ */
+ public final void persist(SkynetTransaction managedTransaction) throws OseeCoreException {
+ managedTransaction.addArtifact(this);
}
/**
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
index 8de9619cfe9..6805e800834 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java
@@ -54,6 +54,10 @@ public class PurgeArtifacts extends AbstractDbTxOperation {
private boolean success;
private final boolean recurseChildrenBranches;
+ public PurgeArtifacts(Collection<? extends Artifact> artifactsToPurge) {
+ this(artifactsToPurge, false);
+ }
+
public PurgeArtifacts(Collection<? extends Artifact> artifactsToPurge, boolean recurseChildrenBranches) {
super(Activator.getInstance().getOseeDatabaseService(), "Purge Artifact", Activator.PLUGIN_ID);
this.artifactsToPurge = new LinkedList<Artifact>(artifactsToPurge);
@@ -61,10 +65,6 @@ public class PurgeArtifacts extends AbstractDbTxOperation {
this.recurseChildrenBranches = recurseChildrenBranches;
}
- public PurgeArtifacts(Collection<? extends Artifact> artifactsToPurge) {
- this(artifactsToPurge, false);
- }
-
@Override
protected void doTxWork(IProgressMonitor monitor, OseeConnection connection) throws OseeCoreException {
if (artifactsToPurge == null || artifactsToPurge.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java
index eec78154e72..8f9c385e123 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java
@@ -152,6 +152,10 @@ public class RoughArtifact {
this.number = new ReqNumbering(number);
}
+ public ReqNumbering getSectionNumber() {
+ return this.number;
+ }
+
public RoughAttributeSet getAttributes() {
return attributes;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java
index fd4b38cf38f..3961b721894 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java
@@ -28,6 +28,9 @@ import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
/**
+ * Usually used as part of the import process to filter items found by the {@link RoughArtifactCollector}
+ * {@link #collector}. Result fills the {@link #selectedArtifactTypes}.
+ *
* @author Roberto E. Escobar
*/
public class FilterArtifactTypesByAttributeTypes extends AbstractOperation {
@@ -36,6 +39,12 @@ public class FilterArtifactTypesByAttributeTypes extends AbstractOperation {
private final Collection<IArtifactType> selectedArtifactTypes;
private final RoughArtifactCollector collector;
+ /**
+ * @param branch
+ * @param collector
+ * @param selectedArtifactTypes ----> <b>MUTABLE</b> list of items {{@link #doWork(IProgressMonitor)} will operate
+ * on.
+ */
public FilterArtifactTypesByAttributeTypes(IOseeBranch branch, RoughArtifactCollector collector, Collection<IArtifactType> selectedArtifactTypes) {
super("Filter Artifact Types", Activator.PLUGIN_ID);
this.branch = branch;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java
index 65ef4cdd488..f5151e55c74 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java
@@ -10,56 +10,111 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.importing.parsers;
-import java.util.Collection;
import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.osee.framework.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.importing.ReqNumbering;
+/**
+ * Decides whether a outline number is valid or invalid.
+ *
+ * @see OutlineResolutionAndNumberTest
+ * @author Karol Wilk
+ */
public final class OutlineResolution {
- public final boolean isInvalidOutlineNumber(String currentOutlineNumber, String lastOutlineNumber) {
- if (Strings.isValid(currentOutlineNumber, lastOutlineNumber)) {
+ /**
+ * Converts <code>currentOutlineNumber</code> and <code>lastOutlineNumber</code> to ReqNumbering (without trimming
+ * ending 0s) and runs
+ * <code>isInvalidOutlineNumber(ReqNumbering currentOutlineNumber, ReqNumbering lastOutlineNumber)</code>
+ *
+ * @param currentOutlineNumber
+ * @param lastOutlineNumber
+ * @return
+ */
+ public boolean isInvalidOutlineNumber(String currentOutlineNumber, String lastOutlineNumber) {
+ boolean resolution = Strings.isValid(currentOutlineNumber, lastOutlineNumber);
+
+ if (resolution) {
ReqNumbering current = new ReqNumbering(currentOutlineNumber, false);
ReqNumbering last = new ReqNumbering(lastOutlineNumber, false);
+ resolution = isInvalidOutlineNumber(current, last);
+ }
+
+ return resolution;
+ }
+
+ /**
+ * Compares <code>currentOutlineNumber</code> and <code>lastOutlineNumber</code> to determine if current is not next
+ * in outline numbering sequence. Assumes that <code>last</code> is the last valid outline number. <b>NOTE</b>
+ * Accepts larger paragraph numbers
+ *
+ * @param currentOutlineNumber
+ * @param lastOutlineNumber
+ * @return
+ */
+ public boolean isInvalidOutlineNumber(ReqNumbering current, ReqNumbering last) {
+ boolean invalid = Conditions.notNull(current, last);
+ if (invalid) {
switch (last.compareTo(current)) {
+ case -1: //just test upper bound of last, assuming last is last correct paragraph no
+ invalid = !generateNextSet(last).contains(current.getNumberString());
+ //and if the current is generally larger but has not been generated, due to sequence of from:
+ // $current.n.k, st "n -> oo, k -> oo", "n, k in Z", "oo is infinity"
+ if (invalid) {
+ invalid = current.getNumberString().length() - last.getNumberString().length() < 4;
+ //TODO: another check could be delta should be at most 1?
+ }
+ break;
case 1:
- case -1:
- boolean check = !generateNextSet(last).contains(current.getNumberString());
- return check;
case 0:
default:
- return false;
+ invalid = true;
+ break;
}
- } else {
- return false;
}
+ return invalid;
}
/**
* @param lastNumberParagrah i.e. new ReqNumbering("4.0");
- * @return set of combinations i.e ["4.1, 5.0"]
+ * @return set of combinations i.e ["4.1, 5.0, 5., 4.0.1"]
*/
- public Collection<String> generateNextSet(ReqNumbering lastNumberParagrah) {
+ public Set<String> generateNextSet(ReqNumbering lastNumberParagrah) {
+
+ Set<String> nextParagraphs = new HashSet<String>();
+
String last = lastNumberParagrah.getNumberString();
- Collection<String> nextParagraphs = new HashSet<String>();
+ if (last.endsWith(".0")) {
+ last = last.substring(0, last.length() - ".0".length());
+ }
- for (int i = last.length() - 1; i >= 0; i--) {
+ last = Strings.truncateEndChar(last, '.');
- if (last.charAt(i) != '.') {
- int currentInt = extractDigitsSafely(last.subSequence(i, i + 1).toString());
+ if (!last.endsWith(".0.1")) { //special s p
+ nextParagraphs.add(last + ".0.1");
+ nextParagraphs.add(last + ".1");
+ }
- if (i == last.length() - 1) {
- nextParagraphs.add(String.format("%s%s", last, ".0.1"));
- nextParagraphs.add(String.format("%s%s", last, ".1"));
- }
+ String[] digits = last.split("\\.");
+ for (int i = 0; i < digits.length; i++) {
+ int incDigit = extractDigitsSafely(digits[i]) + 1;
- nextParagraphs.add(String.format("%s%s", last.subSequence(0, i),
- (i != 0) ? currentInt + 1 : String.format("%s.0", currentInt + 1)));
+ if (i == 0) {
+ nextParagraphs.add(incDigit + ".0");
+ nextParagraphs.add(incDigit + ".");
+ } else {
+ StringBuilder nextNew = new StringBuilder(digits.length * 2);
+ for (int j = 0; j < i; j++) {
+ nextNew.append(digits[j] + ".");
+ }
+ nextParagraphs.add(nextNew.toString() + Integer.toString(incDigit));
}
- }
+ }
return nextParagraphs;
}
@@ -68,7 +123,7 @@ public final class OutlineResolution {
try {
returnValue = Integer.parseInt(stringContainingDigit);
} catch (NumberFormatException ex) {
- returnValue = 0;
+ //Do nothing
}
return returnValue;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaData.java
new file mode 100644
index 00000000000..ec6add47ad6
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/RoughArtifactMetaData.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.skynet.core.importing.parsers;
+
+import org.eclipse.osee.framework.jdk.core.util.Strings;
+
+/**
+ * <p>
+ * Used during importing to describe meta properties of <br/>
+ * outline paragraph numbers and their surrounding data.
+ * </p>
+ * <b>NOTE</b>: This is an attempt (an experiment) at a more flexible parsing results of WordML.
+ */
+public final class RoughArtifactMetaData {
+
+ private static final float CONFIDENCE = 80f;
+
+ /**
+ * <p>
+ * Decide on some criteria what is a match. <br/>
+ * </p>
+ *
+ * @return based on CONFIDENCE and if underlying data is lengthwise the same.
+ */
+ public static boolean matches(String string1, String string2) {
+ boolean match = false;
+
+ String oPstyle = normalize(string1);
+ String thisPstyle = normalize(string2);
+
+ match = oPstyle.length() == thisPstyle.length();
+
+ if (match) {
+ match = confidenceCompare(oPstyle, thisPstyle) >= CONFIDENCE;
+ }
+
+ return match;
+ }
+
+ private static String normalize(String value) {
+ return Strings.isValid(value) ? value.toLowerCase() : Strings.emptyString();
+ }
+
+ /**
+ * Compares strings and returns percentage of similarity. Assuming two arguments are same length and have been
+ * lowerCased.
+ *
+ * @return amount of confidence 2 strings are similar
+ */
+ private static float confidenceCompare(String string1, String string2) {
+ float caseConfidence = 0;
+ for (int i = 0; i < string1.length(); i++) {
+ if (string1.charAt(i) == string2.charAt(i)) {
+ caseConfidence = (i + 1) / (float) string1.length() * 100;
+ } else {
+ break;
+ }
+ }
+ return caseConfidence;
+ }
+}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java
index 4d94c7cdf61..e0b5e934383 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java
@@ -39,7 +39,7 @@ public class WordOutlineExtractor extends AbstractArtifactExtractor {
private static final String TABLE_TAG_WITH_ATTRS = "<w:tbl ";
private static final String TABLE_TAG_EMPTY = "<w:tbl/>";
private static final String TABLE_TAG = "<w:tbl>";
- private static final CharSequence[] BODY_TAGS = new CharSequence[] {
+ private static final CharSequence[] BODY_TAGS = {
PARAGRAPH_TAG,
PARAGRAPH_TAG_EMPTY,
PARAGRAPH_TAG_WITH_ATTRS,
@@ -70,10 +70,6 @@ public class WordOutlineExtractor extends AbstractArtifactExtractor {
private boolean forcePrimaryType;
private String paragraphStyle;
- public WordOutlineExtractor() {
- //
- }
-
@Override
public String getName() {
return "Word Outline";
@@ -185,15 +181,15 @@ public class WordOutlineExtractor extends AbstractArtifactExtractor {
matcher.group(ATTRIBUTE_BLOCK_GROUP) == null ? "" : matcher.group(ATTRIBUTE_BLOCK_GROUP);
String elementContent = matcher.group(CONTENT_GROUP) == null ? "" : matcher.group(CONTENT_GROUP);
- if (elementName.equals("forceBodyOn")) {
+ if ("forceBodyOn".equals(elementName)) {
forceBody = true;
- } else if (elementName.equals("forceBodyOff")) {
+ } else if ("forceBodyOff".equals(elementName)) {
forceBody = false;
- } else if (elementName.equals("pStyle")) {
+ } else if ("pStyle".equals(elementName)) {
paragraphStyle = getAttributeValue("w:val", elementAttributes);
- } else if (elementName.equals("forcePrimaryType")) {
+ } else if ("forcePrimaryType".equals(elementName)) {
forcePrimaryType = true;
- } else if (elementNamespace.startsWith("w") && elementName.equals("t")) {
+ } else if (elementNamespace.startsWith("w") && "t".equals(elementName)) {
String numberCandidate = getAttributeValue("wx:val", elementAttributes);
reqNumberMatcher.reset(numberCandidate);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java
index 53523d9fdd8..b70989e1aae 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java
@@ -10,32 +10,22 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.importing.parsers;
-import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeExceptions;
import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.core.operation.OperationLogger;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact;
import org.eclipse.osee.framework.skynet.core.importing.RoughArtifactKind;
import org.eclipse.osee.framework.skynet.core.importing.operations.RoughArtifactCollector;
-import org.eclipse.osee.framework.skynet.core.internal.Activator;
import org.eclipse.osee.framework.skynet.core.word.WordUtil;
/**
* @see WordOutlineTest
- * @author Karol M. Wilk
*/
public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate {
private static final String WORD_OUTLINE_PARSER_NAME = "Word Outline";
@@ -46,7 +36,7 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
private static final Pattern OUTLINE_NUMBER_REGEX = Pattern.compile("((?>\\d+\\.)+\\d*(?>-\\d+)*)\\s*");
// This assumes that the user uses a generated Table of Contents from Word and does not come up with
- // his/hers own version of of a style can call it "TOC\d+"
+ // his/hers own version of a style can call it "TOC\d+"
private static final Pattern TOC_HYPERLINK_PATTERN = Pattern.compile(".*<w:pStyle w:val=\"TOC\\d+?\"/>.*",
Pattern.DOTALL);
private boolean possibleTableOfContents;
@@ -63,12 +53,9 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
* Keeps state whether on what user decided last
*/
private ContentType lastDeterminedContentType = ContentType.OUTLINE_TITLE;
- /**
- * Keeps state whether user was asked for help.
- */
- private boolean userAskedForHelp;
private Map<String, RoughArtifact> duplicateCatcher;
+ private Map<String, String> roughArtMeta;
private RoughArtifact previousNamedArtifact;
private RoughArtifact roughArtifact;
@@ -81,36 +68,6 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
private boolean initalized;
private final OutlineResolution outlineResolution = new OutlineResolution();
- private IConflictResolvingGui conflictResolvingGui = null;
-
- public WordOutlineExtractorDelegate() {
- this(new IConflictResolvingGui() {
- @Override
- public ContentType determineContentType(Collection<String> paramList) throws OseeCoreException {
- Status status = new Status(IStatus.WARNING, Activator.PLUGIN_ID, 258, "", null);
- IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
- Object object = null;
- try {
- object = handler.handleStatus(status, paramList);
- } catch (CoreException ex) {
- OseeExceptions.wrapAndThrow(ex);
- }
- return (ContentType) object;
- }
- });
- }
-
- public WordOutlineExtractorDelegate(IConflictResolvingGui gui) {
- conflictResolvingGui = gui;
- }
-
- public IConflictResolvingGui getOutlineResolvingUi() {
- return conflictResolvingGui;
- }
-
- public interface IConflictResolvingGui {
- ContentType determineContentType(Collection<String> paramList) throws OseeCoreException;
- }
@Override
public boolean isApplicable(IArtifactExtractor parser) {
@@ -123,6 +80,7 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
@Override
public void initialize() {
duplicateCatcher = new HashMap<String, RoughArtifact>();
+ roughArtMeta = new HashMap<String, String>();
lastHeaderNumber = new StringBuffer();
lastHeaderName = new StringBuffer();
lastContent = new StringBuffer();
@@ -131,7 +89,6 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
wordFormattedContent = new StringBuilder();
initalized = true;
possibleTableOfContents = false;
- userAskedForHelp = false;
}
/**
@@ -140,19 +97,20 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
@Override
public void dispose() {
duplicateCatcher = null;
+ roughArtMeta = null;
previousNamedArtifact = null;
roughArtifact = null;
lastHeaderNumber = null;
lastHeaderName = null;
lastContent = null;
initalized = false;
- userAskedForHelp = false;
possibleTableOfContents = false;
}
@Override
public final void processContent(OperationLogger logger, RoughArtifactCollector collector, boolean forceBody, boolean forcePrimaryType, String headerNumber, String listIdentifier, String paragraphStyle, String content, boolean isParagraph) throws OseeCoreException {
if (Strings.isValid(content) && initalized) {
+
if (!possibleTableOfContents) {
possibleTableOfContents = TOC_HYPERLINK_PATTERN.matcher(content).matches();
if (possibleTableOfContents && logger != null) {
@@ -164,21 +122,20 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
StringBuilder outlineName = new StringBuilder(); //Title i.e. Scope
StringBuilder outlineContent = null; // Content, text, table content, etc.
- boolean newOutlineNumber = processOutlineNumberAndName(content, outlineNumber, outlineName);
+ boolean newOutlineNumber = processOutlineNumberAndName(content, outlineNumber, outlineName, paragraphStyle);
- //outline number detection failed, try content
- if (!newOutlineNumber) {
- processContentOfParagraph(content, outlineContent);
- }
-
- if (collector != null && newOutlineNumber) {
+ if (newOutlineNumber) {
setContent();
- roughArtifact = setUpNewArtifact(collector, outlineNumber.toString());
+ String number = outlineNumber.toString();
+ roughArtifact = setUpNewArtifact(collector, number);
previousNamedArtifact = roughArtifact;
processHeadingText(roughArtifact, WordUtil.textOnly(outlineName.toString()));
- } else if (roughArtifact != null) {
+ roughArtMeta.put(number, paragraphStyle);
+ } else {
+ processContentOfParagraph(content, outlineContent);
wordFormattedContent.append(content);
}
+
} else {
throw new OseeCoreException(
"%s::processContent() Either passed in content is invalid or *Delegate hasn't been initialized...",
@@ -212,22 +169,37 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
* Gets content and attempts to extract outline number and title, if it fails with regular regex, it tries
* specializedOutlineNumberTitleExtract()
*/
- private boolean processOutlineNumberAndName(String content, StringBuilder outlineNumber, StringBuilder outlineName) throws OseeCoreException {
+ private boolean processOutlineNumberAndName(String content, StringBuilder outlineNumberStorage, StringBuilder outlineName, String paragraphStyle) {
Matcher listItemMatcher = LIST_ITEM_REGEX.matcher(content);
if (listItemMatcher.find()) { // wx:val grab
- //does duplicate catcher contain this number already?
+
String number = listItemMatcher.group(1).trim();
+
if (duplicateCatcher.get(number) == null) {
- outlineNumber.append(number);
+
+ if (previousNamedArtifact == null) {
+
+ outlineNumberStorage.append(number); //definitely store because no other artifact exist so far
+
+ } else {
+
+ boolean valid = determineIfValid(number, paragraphStyle);
+ if (valid) {
+ outlineNumberStorage.append(number);
+ }
+
+ }
+
}
+
} else {
- specializedOutlineNumberTitleExtract(content, outlineNumber, outlineName);
+ specializedOutlineNumberTitleExtract(content, outlineNumberStorage, outlineName, paragraphStyle);
}
- boolean outlineNumberDetected = outlineNumber.length() != 0;
+ boolean outlineNumberDetected = outlineNumberStorage.length() != 0;
if (outlineNumberDetected) {
lastHeaderNumber.setLength(0);
- setLastHeaderNumber(outlineNumber.toString());
+ setLastHeaderNumber(outlineNumberStorage.toString());
grabNameAndTemplateContent(content, outlineName);
if (outlineName.length() != 0) {
@@ -238,6 +210,24 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
return outlineNumberDetected;
}
+ private boolean determineIfValid(String number, String paragraphStyle) {
+ boolean result = false;
+
+ if (previousNamedArtifact != null) {
+ String metaData = roughArtMeta.get(previousNamedArtifact.getSectionNumber().getNumberString());
+
+ paragraphStyle = Strings.isValid(paragraphStyle) ? paragraphStyle : Strings.EMPTY_STRING;
+
+ boolean invalid =
+ outlineResolution.isInvalidOutlineNumber(number, previousNamedArtifact.getSectionNumber().getNumberString());
+ result = !invalid && RoughArtifactMetaData.matches(metaData, paragraphStyle);
+ } else {
+ result = true; //accept since there is no previous
+ }
+
+ return result;
+ }
+
/**
* Grabs outline text or content. Stores results in outLineStorage.
*/
@@ -259,7 +249,7 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
*
* @note Paragraph numbering must be zero based. "1.0 SCOPE" instead of "1. SCOPE"
*/
- private void specializedOutlineNumberTitleExtract(String paragraph, StringBuilder outlineNumberStorage, StringBuilder outlineTitleStorage) throws OseeCoreException {
+ private void specializedOutlineNumberTitleExtract(String paragraph, StringBuilder outlineNumberStorage, StringBuilder outlineTitleStorage, String paragraphStyle) {
StringBuilder wtStorage = new StringBuilder(paragraph.length());
Matcher wtElementMatcher = WT_ELEMENT_REGEX.matcher(paragraph);
while (wtElementMatcher.find()) {
@@ -273,7 +263,7 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
if (outlineNumberMatcher.matches() && paragraphNumber.length() > 2) { //length check excludes 1. non-zero based paragraph numbers.
processSpecializedOutlineNumberAndTitle(outlineNumberMatcher.group(),
wtStorage.subSequence(indexOfFirstSpace, wtStorage.length()).toString(), outlineNumberStorage,
- outlineTitleStorage);
+ outlineTitleStorage, paragraphStyle);
} else {
outlineTitleStorage = wtStorage;
}
@@ -284,24 +274,9 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
}
- private void processSpecializedOutlineNumberAndTitle(String currentOutlineNumber, String formOfOutlineTitle, StringBuilder outlineNumberStorage, StringBuilder outlineTitleStorage) throws OseeCoreException {
- String lastOutlineNumber = getLastHeaderNumber();
-
- lastDeterminedContentType = ContentType.OUTLINE_TITLE;
-
- if (outlineResolution.isInvalidOutlineNumber(currentOutlineNumber, lastOutlineNumber)) {
- if (duplicateCatcher.get(currentOutlineNumber) == null) {
- userAskedForHelp = true;
- Collection<String> paramList = new ArrayList<String>();
- paramList.add(lastOutlineNumber);
- paramList.add(currentOutlineNumber);
- lastDeterminedContentType = conflictResolvingGui.determineContentType(paramList);
- } else {
- lastDeterminedContentType = ContentType.CONTENT;
- }
- } else {
- userAskedForHelp = false;
- }
+ private void processSpecializedOutlineNumberAndTitle(String currentOutlineNumber, String formOfOutlineTitle, StringBuilder outlineNumberStorage, StringBuilder outlineTitleStorage, String paragraphStyle) {
+ boolean valid = determineIfValid(currentOutlineNumber, paragraphStyle);
+ lastDeterminedContentType = valid ? ContentType.OUTLINE_TITLE : ContentType.CONTENT;
switch (lastDeterminedContentType) {
case CONTENT:
@@ -317,10 +292,9 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
}
}
- public boolean userAskedForHelp() {
- return userAskedForHelp;
- }
-
+ /**
+ * Sets up storage (word formatted storage) for new artifact.
+ */
private void setContent() {
if (roughArtifact != null) {
roughArtifact.addAttribute(CoreAttributeTypes.WordTemplateContent, wordFormattedContent.toString());
@@ -346,15 +320,18 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate
RoughArtifact roughArtifact = new RoughArtifact(RoughArtifactKind.PRIMARY);
duplicateCatcher.put(outlineNumber, roughArtifact);
- collector.addRoughArtifact(roughArtifact);
+ if (collector != null) {
+ collector.addRoughArtifact(roughArtifact);
+ }
roughArtifact.setSectionNumber(outlineNumber);
roughArtifact.addAttribute(CoreAttributeTypes.ParagraphNumber, outlineNumber);
return roughArtifact;
} else {
+ String previousArtifcatName = previousNamedArtifact != null ? previousNamedArtifact.getName() : "null";
throw new OseeStateException("Paragraph %s found more than once following \"%s\" which is a duplicate of %s",
- outlineNumber, previousNamedArtifact.getName(), duplicateArtifact.getName());
+ outlineNumber, previousArtifcatName, duplicateArtifact.getName());
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
index 774f5401c86..fca5531864c 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
@@ -29,7 +29,6 @@ import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
-import org.eclipse.osee.framework.database.core.DatabaseTransactions;
import org.eclipse.osee.framework.database.core.IOseeStatement;
import org.eclipse.osee.framework.database.core.OseeSql;
import org.eclipse.osee.framework.database.core.SQL3DataType;
@@ -110,9 +109,7 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
try {
TransactionDelta txDelta = new TransactionDelta(fromTransactionId, toTransactionId);
- int count = 0;
while (chStmt.next()) {
- count++;
int attrId = chStmt.getInt("attr_id");
int artId = chStmt.getInt("art_id");
int sourceGamma = chStmt.getInt("gamma_id");
@@ -168,7 +165,6 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
private void loadAttributeWasValues(Branch sourceBranch, TransactionRecord transactionId, Set<Integer> artIds, IProgressMonitor monitor, Map<Integer, ChangeBuilder> attributesWasValueCache, boolean hasBranch) throws OseeCoreException, OseeDataStoreException {
if (!artIds.isEmpty()) {
- int count = 0;
int sqlParamter; // Will either be a branch id or transaction id
Branch wasValueBranch;
String sql;
@@ -198,7 +194,6 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
int previousAttrId = -1;
while (chStmt.next()) {
- count++;
int attrId = chStmt.getInt("attr_id");
if (previousAttrId != attrId) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java
index d2d7cecb805..508bad571ba 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java
@@ -13,12 +13,10 @@ package org.eclipse.osee.framework.skynet.core.word;
import java.io.StringWriter;
import java.util.Collection;
import java.util.Stack;
-
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.xpath.XPath;
-
import org.apache.xml.serialize.OutputFormat;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
@@ -30,10 +28,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
-
-
-
public class UpdateBookmarkIds {
private static final String WORD_PREFIX =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><?mso-application progid=\"Word.Document\"?><w:wordDocument xmlns:aml=\"http://schemas.microsoft.com/aml/2001/core\" xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\" xmlns:ve=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w=\"http://schemas.microsoft.com/office/word/2003/wordml\" xmlns:wx=\"http://schemas.microsoft.com/office/word/2003/auxHint\" xmlns:wsp=\"http://schemas.microsoft.com/office/word/2003/wordml/sp2\" xmlns:sl=\"http://schemas.microsoft.com/schemaLibrary/2003/core\" w:macrosPresent=\"no\" w:embeddedObjPresent=\"no\" w:ocxPresent=\"no\" xml:space=\"preserve\">";
@@ -119,9 +113,9 @@ public class UpdateBookmarkIds {
}
}
if (changesMade) {
- //This technique is necessary because Word does not support start and ending empty tags.
- OutputFormat myOutputFormat = Jaxp.getCompactFormat(document);
- toReturn = stripOffBodyTag(Jaxp.xmlToString(document, myOutputFormat));
+ //This technique is necessary because Word does not support start and ending empty tags.
+ OutputFormat myOutputFormat = Jaxp.getCompactFormat(document);
+ toReturn = stripOffBodyTag(Jaxp.xmlToString(document, myOutputFormat));
}
} catch (Exception ex) {
OseeExceptions.wrapAndThrow(ex);
@@ -138,6 +132,7 @@ public class UpdateBookmarkIds {
return bookMarkId;
}
+ @SuppressWarnings("unused")
private static String xmlSectionToString(Node root) throws XMLStreamException {
StringWriter writer = new StringWriter();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ArtifactImportWizardTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ArtifactImportWizardTest.java
index 3b4dc23832c..bd72cb4a356 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ArtifactImportWizardTest.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ArtifactImportWizardTest.java
@@ -10,18 +10,14 @@
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet.test.importer;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
import java.net.URL;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.operation.IOperation;
@@ -115,21 +111,12 @@ public final class ArtifactImportWizardTest {
private void buildAndRunCoreTest(String nameOfExcelImportFile) throws Exception {
File inputExcelFile = OseeData.getFile("artifact.import.wizard.test." + nameOfExcelImportFile);
-
URL url = ArtifactImportWizardTest.class.getResource(nameOfExcelImportFile);
+ url = FileLocator.resolve(url);
+
Assert.assertNotNull(url);
- // Copy input file from jar file during build and test
- InputStream inputStream = null;
- OutputStream outputStream = null;
- try {
- inputStream = new BufferedInputStream(url.openStream());
- outputStream = new BufferedOutputStream(new FileOutputStream(inputExcelFile));
- Lib.inputStreamToOutputStream(inputStream, outputStream);
- } finally {
- Lib.close(inputStream);
- Lib.close(outputStream);
- }
+ Lib.copyFile(new File(url.toURI()), inputExcelFile);
Assert.assertTrue(inputExcelFile.exists());
try {
@@ -140,10 +127,10 @@ public final class ArtifactImportWizardTest {
collector.reset();
IOperation operation =
- ArtifactImportOperationFactory.createArtifactAndRoughToRealOperation(inputExcelFile, myRootArtifact, null,
+ ArtifactImportOperationFactory.createOperation(inputExcelFile, myRootArtifact, null,
new ExcelArtifactExtractor(), resolver, collector, Arrays.asList(CoreArtifactTypes.SystemRequirement),
true, true, false);
- Operations.executeWork(operation);
+ Operations.executeWorkAndCheckStatus(operation);
Assert.assertFalse(collector.getRoughArtifacts().isEmpty());
} finally {
@@ -151,23 +138,24 @@ public final class ArtifactImportWizardTest {
}
}
+ /**
+ * setup artifact tree of this form:
+ *
+ * <pre>
+ * myRootArtifact
+ * |
+ * `--A
+ * | \._ C
+ * | |
+ * | `._ D
+ * |
+ * `--B
+ * </pre>
+ *
+ * Where myRootArtifact real name is "ArtifactImportWizardTest_Root"
+ */
@Before
public void setUp() throws Exception {
- //@formatter:off
- /*
- setup artifact tree of this form:
- myRootArtifact
- |
- `--A
- | \._ C
- | |
- | `._ D
- |
- `--B
- Where myRootArtifact real name is "ArtifactImportWizardTest_Root"
- */
- //@formatter:on
-
myRootArtifact =
ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, DemoSawBuilds.SAW_Bld_1,
"ArtifactImportWizardTest_Root", "ArtifatImpWizaTestGUID", "12345");
@@ -193,8 +181,7 @@ public final class ArtifactImportWizardTest {
@After
public void tearDown() throws Exception {
- Operations.executeWorkAndCheckStatus(new PurgeArtifacts(myRootArtifact.getDescendants()));
- Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Collections.singletonList(myRootArtifact)));
+ Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Collections.singletonList(myRootArtifact), true));
}
@BeforeClass
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ImportTestSuite.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ImportTestSuite.java
index 474edebbcca..7a576a50d14 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ImportTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/ImportTestSuite.java
@@ -14,7 +14,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
-@Suite.SuiteClasses({ArtifactImportWizardTest.class})
+@Suite.SuiteClasses({ArtifactImportWizardTest.class, WordOutlineAndStyleTest.class})
/**
* @author Karol M. Wilk
*/
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyleTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyleTest.java
new file mode 100644
index 00000000000..856c2a4283c
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyleTest.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.ui.skynet.test.importer;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.osee.framework.core.data.IArtifactType;
+import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.core.operation.NullOperationLogger;
+import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.jdk.core.util.GUID;
+import org.eclipse.osee.framework.jdk.core.util.Lib;
+import org.eclipse.osee.framework.plugin.core.util.OseeData;
+import org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
+import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts;
+import org.eclipse.osee.framework.skynet.core.importing.RoughArtifact;
+import org.eclipse.osee.framework.skynet.core.importing.RoughArtifactKind;
+import org.eclipse.osee.framework.skynet.core.importing.operations.RoughArtifactCollector;
+import org.eclipse.osee.framework.skynet.core.importing.parsers.IArtifactExtractor;
+import org.eclipse.osee.framework.skynet.core.importing.parsers.WordOutlineExtractor;
+import org.eclipse.osee.framework.skynet.core.importing.parsers.WordOutlineExtractorDelegate;
+import org.eclipse.osee.framework.skynet.core.importing.resolvers.IArtifactImportResolver;
+import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
+import org.eclipse.osee.framework.ui.skynet.Import.ArtifactImportOperationFactory;
+import org.eclipse.osee.framework.ui.skynet.Import.MatchingStrategy;
+import org.eclipse.osee.support.test.util.DemoSawBuilds;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * Test Case for {@link WordOutlineExtractorDelegate} <br/>
+ * Tests parsing mechanism to determine if all artifacts have been picked up. <br/>
+ *
+ * @author Karol M. Wilk
+ */
+@RunWith(Parameterized.class)
+public final class WordOutlineAndStyleTest {
+
+ /**
+ * <pre>
+ * 1.0 A
+ * 2.0 B
+ * 3.0 C
+ * 3.0 Ignored
+ * 4.0 D
+ * </pre>
+ *
+ * All artifacts have same style.
+ */
+ private static final String CASE_1 = "WordOutlineAndStyle_case1.xml";
+
+ /**
+ * <pre>
+ * 1.0 A
+ * 1.0 A_1
+ * 2.0 A_2
+ * 2.0 B
+ * </pre>
+ *
+ * A and B have a Heading8 style, while A_1 and A_2 are styled as list items.
+ */
+ private static final String CASE_2 = "WordOutlineAndStyle_case2.xml";
+
+ /**
+ * <pre>
+ * 1.0 A
+ * 2.0 B
+ * 3.0 C
+ * </pre>
+ *
+ * C's style is Normal should be treated as part of the body. This tests testing against last paragraph </br> number
+ * that follows the sequence but not the style of paragraph numbers. A and B are of the same style.
+ */
+ private static final String CASE_3 = "WordOutlineAndStyle_case3.xml";
+
+ private final String testComment;
+ private final String wordMLFileName;
+ private final List<String> expected;
+
+ private Artifact folder;
+
+ public WordOutlineAndStyleTest(String testComment, String wordMLFileName, List<String> expected) {
+ this.testComment = testComment;
+ this.wordMLFileName = wordMLFileName;
+ this.expected = expected;
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ Artifact root = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(DemoSawBuilds.SAW_Bld_1);
+ String name = WordOutlineAndStyleTest.class.getSimpleName() + "_Folder";
+ folder =
+ ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, DemoSawBuilds.SAW_Bld_1, name, GUID.create(),
+ "12345");
+ root.addChild(folder);
+ root.persist(name);
+ }
+
+ @Test
+ public void testStyleResolution() throws Exception {
+ buildUpTest(wordMLFileName);
+ Assert.assertEquals(testComment, expected, Artifacts.getNames(folder.getDescendants()));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ Operations.executeWorkAndCheckStatus(new PurgeArtifacts(folder.getChildren(), true));
+ Operations.executeWorkAndCheckStatus(new PurgeArtifacts(Collections.<Artifact> singleton(folder)));
+ }
+
+ @Parameters
+ public static List<Object[]> getData() {
+ List<Object[]> data = new LinkedList<Object[]>();
+
+ data.add(new Object[] {"Case 1", CASE_1, Arrays.asList("A", "B", "C", "D")});
+ data.add(new Object[] {"Case 2", CASE_2, Arrays.asList("A", "B")});
+ data.add(new Object[] {"Case 3", CASE_3, Arrays.asList("A", "B")});
+
+ return data;
+ }
+
+ private void buildUpTest(String testCaseFileName) throws Exception {
+ File inputTestCase = OseeData.getFile("word.outline.and.style.test." + testCaseFileName);
+ URL url = getClass().getResource(testCaseFileName);
+
+ url = FileLocator.resolve(url);
+
+ Assert.assertNotNull(url);
+
+ Lib.copyFile(new File(url.toURI()), inputTestCase);
+
+ Assert.assertTrue(inputTestCase.exists());
+
+ try {
+ IArtifactImportResolver resolver =
+ MatchingStrategy.GUID.getResolver(CoreArtifactTypes.Heading, null, true, true);
+
+ RoughArtifactCollector collector = new RoughArtifactCollector(new RoughArtifact(RoughArtifactKind.PRIMARY));
+ collector.reset();
+
+ IArtifactExtractor extractor = new WordOutlineExtractor();
+ extractor.setDelegate(new WordOutlineExtractorDelegate());
+
+ List<IArtifactType> list = new ArrayList<IArtifactType>();
+ list.add(CoreArtifactTypes.Heading);
+
+ IOperation operation =
+ ArtifactImportOperationFactory.createOperation(inputTestCase, folder, NullOperationLogger.getSingleton(),
+ extractor, resolver, collector, list, true, false, true);
+ Operations.executeWorkAndCheckStatus(operation);
+
+ boolean newArtifactsFound = !folder.getDescendants().isEmpty();
+ Assert.assertTrue(newArtifactsFound);
+ } finally {
+ inputTestCase.delete();
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case1.xml b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case1.xml
new file mode 100644
index 00000000000..6280668b3e9
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case1.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?mso-application progid="Word.Document"?>
+<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/><o:DocumentProperties><o:Author>Karol Wilk</o:Author><o:LastAuthor>Karol Wilk</o:LastAuthor><o:Revision>4</o:Revision><o:TotalTime>3</o:TotalTime><o:Created>2012-01-23T15:31:00Z</o:Created><o:LastSaved>2012-01-23T16:34:00Z</o:LastSaved><o:Pages>1</o:Pages><o:Words>1</o:Words><o:Characters>10</o:Characters><o:Company>The Boeing Company</o:Company><o:Lines>1</o:Lines><o:Paragraphs>1</o:Paragraphs><o:CharactersWithSpaces>10</o:CharactersWithSpaces><o:Version>12</o:Version></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii="Calibri" w:fareast="Calibri" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:font w:name="Times New Roman"><w:panose-1 w:val="02020603050405020304"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="20002A87" w:usb-1="80000000" w:usb-2="00000008" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/></w:font><w:font w:name="Cambria Math"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="01"/><w:family w:val="Roman"/><w:notTrueType/><w:pitch w:val="variable"/><w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000"/></w:font><w:font w:name="Calibri"><w:panose-1 w:val="020F0502020204030204"/><w:charset w:val="00"/><w:family w:val="Swiss"/><w:pitch w:val="variable"/><w:sig w:usb-0="A00002EF" w:usb-1="4000207B" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="0000009F" w:csb-1="00000000"/></w:font></w:fonts><w:lists><w:listDef w:listDefId="0"><w:lsid w:val="01137187"/><w:plt w:val="Multilevel"/><w:tmpl w:val="7BE8E09A"/><w:lvl w:ilvl="0"><w:start w:val="3"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:listDef w:listDefId="1"><w:lsid w:val="2E4B2287"/><w:plt w:val="Multilevel"/><w:tmpl w:val="0F101630"/><w:lvl w:ilvl="0"><w:start w:val="1"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:start w:val="1"/><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:list w:ilfo="1"><w:ilst w:val="1"/></w:list><w:list w:ilfo="2"><w:ilst w:val="0"/></w:list></w:lists><w:styles><w:versionOfBuiltInStylenames w:val="7"/><w:latentStyles w:defLockedState="off" w:latentStyleCount="267"><w:lsdException w:name="Normal"/><w:lsdException w:name="heading 1"/><w:lsdException w:name="heading 2"/><w:lsdException w:name="heading 3"/><w:lsdException w:name="heading 4"/><w:lsdException w:name="heading 5"/><w:lsdException w:name="heading 6"/><w:lsdException w:name="heading 7"/><w:lsdException w:name="heading 8"/><w:lsdException w:name="heading 9"/><w:lsdException w:name="caption"/><w:lsdException w:name="Title"/><w:lsdException w:name="Subtitle"/><w:lsdException w:name="Strong"/><w:lsdException w:name="Emphasis"/><w:lsdException w:name="No Spacing"/><w:lsdException w:name="List Paragraph"/><w:lsdException w:name="Quote"/><w:lsdException w:name="Intense Quote"/><w:lsdException w:name="Subtle Emphasis"/><w:lsdException w:name="Intense Emphasis"/><w:lsdException w:name="Subtle Reference"/><w:lsdException w:name="Intense Reference"/><w:lsdException w:name="Book Title"/><w:lsdException w:name="TOC Heading"/></w:latentStyles><w:style w:type="paragraph" w:default="on" w:styleId="Normal"><w:name w:val="Normal"/><w:rsid w:val="008744F4"/><w:pPr><w:spacing w:after="200" w:line="276" w:line-rule="auto"/></w:pPr><w:rPr><wx:font wx:val="Calibri"/><w:sz w:val="22"/><w:sz-cs w:val="22"/><w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="character" w:default="on" w:styleId="DefaultParagraphFont"><w:name w:val="Default Paragraph Font"/></w:style><w:style w:type="table" w:default="on" w:styleId="TableNormal"><w:name w:val="Normal Table"/><wx:uiName wx:val="Table Normal"/><w:rPr><wx:font wx:val="Calibri"/><w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/></w:rPr><w:tblPr><w:tblInd w:w="0" w:type="dxa"/><w:tblCellMar><w:top w:w="0" w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right w:w="108" w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style w:type="list" w:default="on" w:styleId="NoList"><w:name w:val="No List"/></w:style><w:style w:type="paragraph" w:styleId="ListParagraph"><w:name w:val="List Paragraph"/><w:basedOn w:val="Normal"/><w:rsid w:val="00DD26A1"/><w:pPr><w:ind w:left="720"/><w:contextualSpacing/></w:pPr><w:rPr><wx:font wx:val="Calibri"/></w:rPr></w:style></w:styles><w:shapeDefaults><o:shapedefaults v:ext="edit" spidmax="4098"/><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout></w:shapeDefaults><w:docPr><w:view w:val="print"/><w:zoom w:percent="100"/><w:doNotEmbedSystemFonts/><w:defaultTabStop w:val="720"/><w:punctuationKerning/><w:characterSpacingControl w:val="DontCompress"/><w:optimizeForBrowser/><w:validateAgainstSchema/><w:saveInvalidXML w:val="off"/><w:ignoreMixedContent w:val="off"/><w:alwaysShowPlaceholderText w:val="off"/><w:compat><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="00DD26A1"/><wsp:rsid wsp:val="00734966"/><wsp:rsid wsp:val="008744F4"/><wsp:rsid wsp:val="00AD3BAC"/><wsp:rsid wsp:val="00BF1AD8"/><wsp:rsid wsp:val="00DD26A1"/><wsp:rsid wsp:val="00E13508"/><wsp:rsid wsp:val="00FD7692"/></wsp:rsids></w:docPr><w:body><w:p wsp:rsidR="008744F4" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="1"/><wx:t wx:val="1.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>A</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="1"/><wx:t wx:val="2.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>B</w:t></w:r></w:p><w:p wsp:rsidR="00734966" wsp:rsidRDefault="00734966" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="1"/><wx:t wx:val="3.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>C</w:t></w:r></w:p><w:p wsp:rsidR="00734966" wsp:rsidRDefault="00734966" wsp:rsidP="00734966"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="1"/><w:ilfo w:val="2"/><wx:t wx:val="3.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>C</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="00734966" wsp:rsidP="00734966"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="2"/><wx:t wx:val="4.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>D</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:ind w:left="360"/></w:pPr></w:p><w:sectPr wsp:rsidR="00DD26A1" wsp:rsidSect="008744F4"><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/><w:cols w:space="720"/><w:docGrid w:line-pitch="360"/></w:sectPr></w:body></w:wordDocument> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case2.xml b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case2.xml
new file mode 100644
index 00000000000..dc707cddfab
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case2.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?mso-application progid="Word.Document"?>
+<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/><o:DocumentProperties><o:Author>Karol Wilk</o:Author><o:LastAuthor>Karol Wilk</o:LastAuthor><o:Revision>8</o:Revision><o:TotalTime>7</o:TotalTime><o:Created>2012-01-23T15:31:00Z</o:Created><o:LastSaved>2012-01-23T16:32:00Z</o:LastSaved><o:Pages>1</o:Pages><o:Words>2</o:Words><o:Characters>12</o:Characters><o:Company>The Boeing Company</o:Company><o:Lines>1</o:Lines><o:Paragraphs>1</o:Paragraphs><o:CharactersWithSpaces>13</o:CharactersWithSpaces><o:Version>12</o:Version></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii="Calibri" w:fareast="Calibri" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:font w:name="Times New Roman"><w:panose-1 w:val="02020603050405020304"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="20002A87" w:usb-1="80000000" w:usb-2="00000008" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/></w:font><w:font w:name="Cambria Math"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="01"/><w:family w:val="Roman"/><w:notTrueType/><w:pitch w:val="variable"/><w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000"/></w:font><w:font w:name="Cambria"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="A00002EF" w:usb-1="4000004B" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="0000009F" w:csb-1="00000000"/></w:font><w:font w:name="Calibri"><w:panose-1 w:val="020F0502020204030204"/><w:charset w:val="00"/><w:family w:val="Swiss"/><w:pitch w:val="variable"/><w:sig w:usb-0="A00002EF" w:usb-1="4000207B" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="0000009F" w:csb-1="00000000"/></w:font></w:fonts><w:lists><w:listDef w:listDefId="0"><w:lsid w:val="107B7FE5"/><w:plt w:val="Multilevel"/><w:tmpl w:val="9124877C"/><w:lvl w:ilvl="0"><w:start w:val="1"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:listDef w:listDefId="1"><w:lsid w:val="23BB6B33"/><w:plt w:val="Multilevel"/><w:tmpl w:val="DFB0FBCC"/><w:lvl w:ilvl="0"><w:start w:val="2"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:listDef w:listDefId="2"><w:lsid w:val="2E4B2287"/><w:plt w:val="Multilevel"/><w:tmpl w:val="0F101630"/><w:lvl w:ilvl="0"><w:start w:val="1"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:start w:val="1"/><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:listDef w:listDefId="3"><w:lsid w:val="467D7A16"/><w:plt w:val="HybridMultilevel"/><w:tmpl w:val="CA8E688A"/><w:lvl w:ilvl="0" w:tplc="B78C16CC"><w:start w:val="1"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="720" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1" w:tplc="04090019" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="4"/><w:lvlText w:val="%2."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1440" w:hanging="360"/></w:pPr></w:lvl><w:lvl w:ilvl="2" w:tplc="0409001B" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="2"/><w:lvlText w:val="%3."/><w:lvlJc w:val="right"/><w:pPr><w:ind w:left="2160" w:hanging="180"/></w:pPr></w:lvl><w:lvl w:ilvl="3" w:tplc="0409000F" w:tentative="on"><w:start w:val="1"/><w:lvlText w:val="%4."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="360"/></w:pPr></w:lvl><w:lvl w:ilvl="4" w:tplc="04090019" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="4"/><w:lvlText w:val="%5."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3600" w:hanging="360"/></w:pPr></w:lvl><w:lvl w:ilvl="5" w:tplc="0409001B" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="2"/><w:lvlText w:val="%6."/><w:lvlJc w:val="right"/><w:pPr><w:ind w:left="4320" w:hanging="180"/></w:pPr></w:lvl><w:lvl w:ilvl="6" w:tplc="0409000F" w:tentative="on"><w:start w:val="1"/><w:lvlText w:val="%7."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5040" w:hanging="360"/></w:pPr></w:lvl><w:lvl w:ilvl="7" w:tplc="04090019" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="4"/><w:lvlText w:val="%8."/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="360"/></w:pPr></w:lvl><w:lvl w:ilvl="8" w:tplc="0409001B" w:tentative="on"><w:start w:val="1"/><w:nfc w:val="2"/><w:lvlText w:val="%9."/><w:lvlJc w:val="right"/><w:pPr><w:ind w:left="6480" w:hanging="180"/></w:pPr></w:lvl></w:listDef><w:listDef w:listDefId="4"><w:lsid w:val="6F706055"/><w:plt w:val="Multilevel"/><w:tmpl w:val="1736DE26"/><w:lvl w:ilvl="0"><w:start w:val="1"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:list w:ilfo="1"><w:ilst w:val="2"/></w:list><w:list w:ilfo="2"><w:ilst w:val="4"/></w:list><w:list w:ilfo="3"><w:ilst w:val="0"/></w:list><w:list w:ilfo="4"><w:ilst w:val="1"/></w:list><w:list w:ilfo="5"><w:ilst w:val="3"/></w:list></w:lists><w:styles><w:versionOfBuiltInStylenames w:val="7"/><w:latentStyles w:defLockedState="off" w:latentStyleCount="267"><w:lsdException w:name="Normal"/><w:lsdException w:name="heading 1"/><w:lsdException w:name="heading 2"/><w:lsdException w:name="heading 3"/><w:lsdException w:name="heading 4"/><w:lsdException w:name="heading 5"/><w:lsdException w:name="heading 6"/><w:lsdException w:name="heading 7"/><w:lsdException w:name="heading 8"/><w:lsdException w:name="heading 9"/><w:lsdException w:name="caption"/><w:lsdException w:name="Title"/><w:lsdException w:name="Subtitle"/><w:lsdException w:name="Strong"/><w:lsdException w:name="Emphasis"/><w:lsdException w:name="No Spacing"/><w:lsdException w:name="List Paragraph"/><w:lsdException w:name="Quote"/><w:lsdException w:name="Intense Quote"/><w:lsdException w:name="Subtle Emphasis"/><w:lsdException w:name="Intense Emphasis"/><w:lsdException w:name="Subtle Reference"/><w:lsdException w:name="Intense Reference"/><w:lsdException w:name="Book Title"/><w:lsdException w:name="TOC Heading"/></w:latentStyles><w:style w:type="paragraph" w:default="on" w:styleId="Normal"><w:name w:val="Normal"/><w:rsid w:val="008744F4"/><w:pPr><w:spacing w:after="200" w:line="276" w:line-rule="auto"/></w:pPr><w:rPr><wx:font wx:val="Calibri"/><w:sz w:val="22"/><w:sz-cs w:val="22"/><w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading1"><w:name w:val="heading 1"/><wx:uiName wx:val="Heading 1"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading1Char"/><w:rsid w:val="00C44268"/><w:pPr><w:keepNext/><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="0"/></w:pPr><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria"/><wx:font wx:val="Cambria"/><w:b/><w:b-cs/><w:kern w:val="32"/><w:sz w:val="32"/><w:sz-cs w:val="32"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading2"><w:name w:val="heading 2"/><wx:uiName wx:val="Heading 2"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading2Char"/><w:rsid w:val="00C44268"/><w:pPr><w:keepNext/><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="1"/></w:pPr><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria"/><wx:font wx:val="Cambria"/><w:b/><w:b-cs/><w:i/><w:i-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading3"><w:name w:val="heading 3"/><wx:uiName wx:val="Heading 3"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading3Char"/><w:rsid w:val="00C44268"/><w:pPr><w:keepNext/><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="2"/></w:pPr><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria"/><wx:font wx:val="Cambria"/><w:b/><w:b-cs/><w:sz w:val="26"/><w:sz-cs w:val="26"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading4"><w:name w:val="heading 4"/><wx:uiName wx:val="Heading 4"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading4Char"/><w:rsid w:val="00C44268"/><w:pPr><w:keepNext/><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="3"/></w:pPr><w:rPr><w:rFonts w:fareast="Times New Roman"/><wx:font wx:val="Calibri"/><w:b/><w:b-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading5"><w:name w:val="heading 5"/><wx:uiName wx:val="Heading 5"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading5Char"/><w:rsid w:val="00C44268"/><w:pPr><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="4"/></w:pPr><w:rPr><w:rFonts w:fareast="Times New Roman"/><wx:font wx:val="Calibri"/><w:b/><w:b-cs/><w:i/><w:i-cs/><w:sz w:val="26"/><w:sz-cs w:val="26"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading6"><w:name w:val="heading 6"/><wx:uiName wx:val="Heading 6"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading6Char"/><w:rsid w:val="00C44268"/><w:pPr><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="5"/></w:pPr><w:rPr><w:rFonts w:fareast="Times New Roman"/><wx:font wx:val="Calibri"/><w:b/><w:b-cs/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading7"><w:name w:val="heading 7"/><wx:uiName wx:val="Heading 7"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading7Char"/><w:rsid w:val="00C44268"/><w:pPr><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="6"/></w:pPr><w:rPr><w:rFonts w:fareast="Times New Roman"/><wx:font wx:val="Calibri"/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Heading8"><w:name w:val="heading 8"/><wx:uiName wx:val="Heading 8"/><w:basedOn w:val="Normal"/><w:next w:val="Normal"/><w:link w:val="Heading8Char"/><w:rsid w:val="00C44268"/><w:pPr><w:spacing w:before="240" w:after="60"/><w:outlineLvl w:val="7"/></w:pPr><w:rPr><w:rFonts w:fareast="Times New Roman"/><wx:font wx:val="Calibri"/><w:i/><w:i-cs/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr></w:style><w:style w:type="character" w:default="on" w:styleId="DefaultParagraphFont"><w:name w:val="Default Paragraph Font"/></w:style><w:style w:type="table" w:default="on" w:styleId="TableNormal"><w:name w:val="Normal Table"/><wx:uiName wx:val="Table Normal"/><w:rPr><wx:font wx:val="Calibri"/><w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/></w:rPr><w:tblPr><w:tblInd w:w="0" w:type="dxa"/><w:tblCellMar><w:top w:w="0" w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right w:w="108" w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style w:type="list" w:default="on" w:styleId="NoList"><w:name w:val="No List"/></w:style><w:style w:type="paragraph" w:styleId="ListParagraph"><w:name w:val="List Paragraph"/><w:basedOn w:val="Normal"/><w:rsid w:val="00DD26A1"/><w:pPr><w:ind w:left="720"/><w:contextualSpacing/></w:pPr><w:rPr><wx:font wx:val="Calibri"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading1Char"><w:name w:val="Heading 1 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading1"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:kern w:val="32"/><w:sz w:val="32"/><w:sz-cs w:val="32"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading2Char"><w:name w:val="Heading 2 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading2"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:i/><w:i-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading3Char"><w:name w:val="Heading 3 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading3"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Cambria" w:fareast="Times New Roman" w:h-ansi="Cambria" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:sz w:val="26"/><w:sz-cs w:val="26"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading4Char"><w:name w:val="Heading 4 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading4"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Calibri" w:fareast="Times New Roman" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:sz w:val="28"/><w:sz-cs w:val="28"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading5Char"><w:name w:val="Heading 5 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading5"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Calibri" w:fareast="Times New Roman" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:i/><w:i-cs/><w:sz w:val="26"/><w:sz-cs w:val="26"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading6Char"><w:name w:val="Heading 6 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading6"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Calibri" w:fareast="Times New Roman" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:b/><w:b-cs/><w:sz w:val="22"/><w:sz-cs w:val="22"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading7Char"><w:name w:val="Heading 7 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading7"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Calibri" w:fareast="Times New Roman" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr></w:style><w:style w:type="character" w:styleId="Heading8Char"><w:name w:val="Heading 8 Char"/><w:basedOn w:val="DefaultParagraphFont"/><w:link w:val="Heading8"/><w:rsid w:val="00C44268"/><w:rPr><w:rFonts w:ascii="Calibri" w:fareast="Times New Roman" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:i/><w:i-cs/><w:sz w:val="24"/><w:sz-cs w:val="24"/></w:rPr></w:style></w:styles><w:shapeDefaults><o:shapedefaults v:ext="edit" spidmax="4098"/><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout></w:shapeDefaults><w:docPr><w:view w:val="print"/><w:zoom w:percent="100"/><w:doNotEmbedSystemFonts/><w:proofState w:spelling="clean" w:grammar="clean"/><w:defaultTabStop w:val="720"/><w:punctuationKerning/><w:characterSpacingControl w:val="DontCompress"/><w:optimizeForBrowser/><w:validateAgainstSchema/><w:saveInvalidXML w:val="off"/><w:ignoreMixedContent w:val="off"/><w:alwaysShowPlaceholderText w:val="off"/><w:compat><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="00DD26A1"/><wsp:rsid wsp:val="002C2F60"/><wsp:rsid wsp:val="002D6FE9"/><wsp:rsid wsp:val="004B12AF"/><wsp:rsid wsp:val="005B444F"/><wsp:rsid wsp:val="008744F4"/><wsp:rsid wsp:val="00AD3BAC"/><wsp:rsid wsp:val="00BF1AD8"/><wsp:rsid wsp:val="00C32137"/><wsp:rsid wsp:val="00C44268"/><wsp:rsid wsp:val="00DD26A1"/><wsp:rsid wsp:val="00E13508"/></wsp:rsids></w:docPr><w:body><wx:sub-section><wx:sub-section><wx:sub-section><wx:sub-section><wx:sub-section><wx:sub-section><wx:sub-section><wx:sub-section><w:p wsp:rsidR="008744F4" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00C44268"><w:pPr><w:pStyle w:val="Heading8"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="5"/><wx:t wx:val="1.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>A</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="005B444F" wsp:rsidP="004B12AF"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="1"/><w:ilfo w:val="2"/><wx:t wx:val="1.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>A</w:t></w:r><w:r wsp:rsidR="004B12AF"><w:t>_1</w:t></w:r></w:p><w:p wsp:rsidR="002D6FE9" wsp:rsidRPr="002D6FE9" wsp:rsidRDefault="002D6FE9" wsp:rsidP="002D6FE9"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="3"/><wx:t wx:val="1.0"/><wx:font wx:val="Times New Roman"/></w:listPr><w:rPr><w:vanish/></w:rPr></w:pPr></w:p><w:p wsp:rsidR="002D6FE9" wsp:rsidRPr="002D6FE9" wsp:rsidRDefault="002D6FE9" wsp:rsidP="002D6FE9"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="3"/><wx:t wx:val="2.0"/><wx:font wx:val="Times New Roman"/></w:listPr><w:rPr><w:vanish/></w:rPr></w:pPr></w:p><w:p wsp:rsidR="004B12AF" wsp:rsidRDefault="004B12AF" wsp:rsidP="002D6FE9"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="1"/><w:ilfo w:val="3"/><wx:t wx:val="2.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>A_2</w:t></w:r></w:p></wx:sub-section><wx:sub-section><w:p wsp:rsidR="002C2F60" wsp:rsidRDefault="002C2F60" wsp:rsidP="00C44268"><w:pPr><w:pStyle w:val="Heading8"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="5"/><wx:t wx:val="2.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>B</w:t></w:r></w:p></wx:sub-section></wx:sub-section></wx:sub-section></wx:sub-section></wx:sub-section></wx:sub-section></wx:sub-section></wx:sub-section><w:sectPr wsp:rsidR="002C2F60" wsp:rsidSect="008744F4"><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/><w:cols w:space="720"/><w:docGrid w:line-pitch="360"/></w:sectPr></w:body></w:wordDocument> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case3.xml b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case3.xml
new file mode 100644
index 00000000000..615f10c9bf1
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/test/importer/WordOutlineAndStyle_case3.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<?mso-application progid="Word.Document"?>
+<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/><o:DocumentProperties><o:Author>Karol Wilk</o:Author><o:LastAuthor>Karol Wilk</o:LastAuthor><o:Revision>3</o:Revision><o:TotalTime>3</o:TotalTime><o:Created>2012-01-23T15:31:00Z</o:Created><o:LastSaved>2012-01-23T15:35:00Z</o:LastSaved><o:Pages>1</o:Pages><o:Words>1</o:Words><o:Characters>10</o:Characters><o:Company>The Boeing Company</o:Company><o:Lines>1</o:Lines><o:Paragraphs>1</o:Paragraphs><o:CharactersWithSpaces>10</o:CharactersWithSpaces><o:Version>12</o:Version></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii="Calibri" w:fareast="Calibri" w:h-ansi="Calibri" w:cs="Times New Roman"/><w:font w:name="Times New Roman"><w:panose-1 w:val="02020603050405020304"/><w:charset w:val="00"/><w:family w:val="Roman"/><w:pitch w:val="variable"/><w:sig w:usb-0="20002A87" w:usb-1="80000000" w:usb-2="00000008" w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000"/></w:font><w:font w:name="Cambria Math"><w:panose-1 w:val="02040503050406030204"/><w:charset w:val="01"/><w:family w:val="Roman"/><w:notTrueType/><w:pitch w:val="variable"/><w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000"/></w:font><w:font w:name="Calibri"><w:panose-1 w:val="020F0502020204030204"/><w:charset w:val="00"/><w:family w:val="Swiss"/><w:pitch w:val="variable"/><w:sig w:usb-0="A00002EF" w:usb-1="4000207B" w:usb-2="00000000" w:usb-3="00000000" w:csb-0="0000009F" w:csb-1="00000000"/></w:font></w:fonts><w:lists><w:listDef w:listDefId="0"><w:lsid w:val="2E4B2287"/><w:plt w:val="Multilevel"/><w:tmpl w:val="0F101630"/><w:lvl w:ilvl="0"><w:start w:val="1"/><w:lvlText w:val="%1.0"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="360" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="1"><w:start w:val="1"/><w:lvlText w:val="%1.%2"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="1080" w:hanging="360"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="2"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2160" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="3"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="2880" w:hanging="720"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="4"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="3960" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="5"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="4680" w:hanging="1080"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="6"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="5760" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="7"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="6480" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl><w:lvl w:ilvl="8"><w:start w:val="1"/><w:lvlText w:val="%1.%2.%3.%4.%5.%6.%7.%8.%9"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="7200" w:hanging="1440"/></w:pPr><w:rPr><w:rFonts w:hint="default"/></w:rPr></w:lvl></w:listDef><w:list w:ilfo="1"><w:ilst w:val="0"/></w:list></w:lists><w:styles><w:versionOfBuiltInStylenames w:val="7"/><w:latentStyles w:defLockedState="off" w:latentStyleCount="267"><w:lsdException w:name="Normal"/><w:lsdException w:name="heading 1"/><w:lsdException w:name="heading 2"/><w:lsdException w:name="heading 3"/><w:lsdException w:name="heading 4"/><w:lsdException w:name="heading 5"/><w:lsdException w:name="heading 6"/><w:lsdException w:name="heading 7"/><w:lsdException w:name="heading 8"/><w:lsdException w:name="heading 9"/><w:lsdException w:name="caption"/><w:lsdException w:name="Title"/><w:lsdException w:name="Subtitle"/><w:lsdException w:name="Strong"/><w:lsdException w:name="Emphasis"/><w:lsdException w:name="No Spacing"/><w:lsdException w:name="List Paragraph"/><w:lsdException w:name="Quote"/><w:lsdException w:name="Intense Quote"/><w:lsdException w:name="Subtle Emphasis"/><w:lsdException w:name="Intense Emphasis"/><w:lsdException w:name="Subtle Reference"/><w:lsdException w:name="Intense Reference"/><w:lsdException w:name="Book Title"/><w:lsdException w:name="TOC Heading"/></w:latentStyles><w:style w:type="paragraph" w:default="on" w:styleId="Normal"><w:name w:val="Normal"/><w:rsid w:val="008744F4"/><w:pPr><w:spacing w:after="200" w:line="276" w:line-rule="auto"/></w:pPr><w:rPr><wx:font wx:val="Calibri"/><w:sz w:val="22"/><w:sz-cs w:val="22"/><w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="character" w:default="on" w:styleId="DefaultParagraphFont"><w:name w:val="Default Paragraph Font"/></w:style><w:style w:type="table" w:default="on" w:styleId="TableNormal"><w:name w:val="Normal Table"/><wx:uiName wx:val="Table Normal"/><w:rPr><wx:font wx:val="Calibri"/><w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA"/></w:rPr><w:tblPr><w:tblInd w:w="0" w:type="dxa"/><w:tblCellMar><w:top w:w="0" w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right w:w="108" w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style w:type="list" w:default="on" w:styleId="NoList"><w:name w:val="No List"/></w:style><w:style w:type="paragraph" w:styleId="ListParagraph"><w:name w:val="List Paragraph"/><w:basedOn w:val="Normal"/><w:rsid w:val="00DD26A1"/><w:pPr><w:ind w:left="720"/><w:contextualSpacing/></w:pPr><w:rPr><wx:font wx:val="Calibri"/></w:rPr></w:style></w:styles><w:shapeDefaults><o:shapedefaults v:ext="edit" spidmax="3074"/><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout></w:shapeDefaults><w:docPr><w:view w:val="print"/><w:zoom w:percent="100"/><w:doNotEmbedSystemFonts/><w:proofState w:spelling="clean" w:grammar="clean"/><w:defaultTabStop w:val="720"/><w:punctuationKerning/><w:characterSpacingControl w:val="DontCompress"/><w:optimizeForBrowser/><w:validateAgainstSchema/><w:saveInvalidXML w:val="off"/><w:ignoreMixedContent w:val="off"/><w:alwaysShowPlaceholderText w:val="off"/><w:compat><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="00DD26A1"/><wsp:rsid wsp:val="008744F4"/><wsp:rsid wsp:val="00AD3BAC"/><wsp:rsid wsp:val="00BF1AD8"/><wsp:rsid wsp:val="00DD26A1"/><wsp:rsid wsp:val="00E13508"/></wsp:rsids></w:docPr><w:body><w:p wsp:rsidR="008744F4" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="1"/><wx:t wx:val="1.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>A</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:listPr><w:ilvl w:val="0"/><w:ilfo w:val="1"/><wx:t wx:val="2.0"/><wx:font wx:val="Times New Roman"/></w:listPr></w:pPr><w:r><w:t>B</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="00AD3BAC" wsp:rsidP="00E13508"><w:pPr><w:ind w:left="0"/></w:pPr><w:r><w:t>3.0 C</w:t></w:r></w:p><w:p wsp:rsidR="00DD26A1" wsp:rsidRDefault="00DD26A1" wsp:rsidP="00DD26A1"><w:pPr><w:pStyle w:val="ListParagraph"/><w:ind w:left="360"/></w:pPr></w:p><w:sectPr wsp:rsidR="00DD26A1" wsp:rsidSect="008744F4"><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/><w:cols w:space="720"/><w:docGrid w:line-pitch="360"/></w:sectPr></w:body></w:wordDocument> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java
index 487915c934a..e09f2a7fbe4 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.framework.ui.skynet.Import;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -49,7 +50,23 @@ public final class ArtifactImportOperationFactory {
super();
}
- public static IOperation createOperation(ArtifactImportOperationParameter param) throws OseeCoreException {
+ /**
+ * <p>
+ * Create a CompositeOperation, full import sequence.<br/>
+ * <ol>
+ * <li>SourceToRoughArtifactOperation</li>
+ * <li>RoughToRealArtifactOperation</li>
+ * <li>ArtifactValidationCheckOperation</li>
+ * <li>CompleteArtifactImportOperation</li>
+ * </ol>
+ * </p>
+ * <br/>
+ *
+ * @param param
+ * @return
+ * @throws OseeCoreException
+ */
+ public static IOperation completeOperation(ArtifactImportOperationParameter param) throws OseeCoreException {
return completeOperation(param.getSourceFile(), param.getDestinationArtifact(), param.getLogger(),
param.getExtractor(), param.getResolver(), param.isStopOnError(), param.getGoverningTransaction(),
param.isExecuteTransaction());
@@ -88,7 +105,18 @@ public final class ArtifactImportOperationFactory {
}
}
- public static IOperation createArtifactAndRoughToRealOperation(File sourceFile, Artifact destinationArtifact, OperationLogger logger, IArtifactExtractor extractor, IArtifactImportResolver resolver, RoughArtifactCollector collector, Collection<IArtifactType> selectionArtifactTypes, boolean stopOnError, boolean deleteUnMatched, boolean runFilterByAttributes) throws OseeCoreException {
+ /**
+ * Creates a full import process.
+ * <ol>
+ * <li>SourceToRoughArtifactOperation</li>
+ * <li>FilterArtifactTypesByAttributeTypes</li> if runFilterByAttributes == true
+ * <li>RoughToRealArtifactOperation</li>
+ * <li>FetchAndAddDescendantsOperation</li>
+ * <li>ArtifactValidationCheckOperation</li>
+ * <li>CompleteArtifactImportOperation</li>
+ * </ol>
+ */
+ public static IOperation createOperation(File sourceFile, Artifact destinationArtifact, OperationLogger logger, IArtifactExtractor extractor, IArtifactImportResolver resolver, RoughArtifactCollector collector, Collection<IArtifactType> selectionArtifactTypes, boolean stopOnError, boolean deleteUnMatched, boolean runFilterByAttributes) throws OseeCoreException {
List<IOperation> ops = new ArrayList<IOperation>();
ops.add(createArtifactsCompOperation(
"Artifact Import - SourceToRoughArtifact, FilterArtifactTypesByAttributeTypes", sourceFile,
@@ -119,33 +147,45 @@ public final class ArtifactImportOperationFactory {
*/
public static IOperation createRoughToRealOperation(String opName, final Artifact destinationArtifact, IArtifactImportResolver resolver, boolean stopOnError, RoughArtifactCollector collector, boolean deleteUnmatchedArtifacts) throws OseeCoreException {
SkynetTransaction transaction =
- TransactionManager.createTransaction(destinationArtifact.getBranch(), "Artifact Import Wizard transaction");
+ TransactionManager.createTransaction(destinationArtifact.getBranch(),
+ "Artifact Import Wizard transaction " + opName);
List<IOperation> ops = new ArrayList<IOperation>();
ops.add(new RoughToRealArtifactOperation(transaction, destinationArtifact, collector, resolver,
deleteUnmatchedArtifacts));
final List<Artifact> children = new ArrayList<Artifact>();
- AbstractOperation operation = new AbstractOperation("Fetch Descendants", Activator.PLUGIN_ID) {
- @Override
- protected void doWork(IProgressMonitor monitor) throws Exception {
- try {
- children.addAll(destinationArtifact.getDescendants());
- } catch (OseeCoreException ex) {
- reportError("Unable to get artifact children: artifact:[%s] branch:[%s]", destinationArtifact.getGuid(),
- destinationArtifact.getBranch().getGuid(), ex);
- }
- }
-
- private void reportError(String message, String arg1, String arg2, Exception ex) throws Exception {
- throw new Exception(String.format(message, arg1, arg2), ex);
- }
- };
-
- ops.add(operation);
+ ops.add(new FetchAndAddDescendantsOperation(children, destinationArtifact));
ops.add(new ArtifactValidationCheckOperation(children, stopOnError));
ops.add(new CompleteArtifactImportOperation(transaction, destinationArtifact));
return new CompositeOperation(opName, Activator.PLUGIN_ID, ops);
}
+
+ private static class FetchAndAddDescendantsOperation extends AbstractOperation {
+
+ private final List<Artifact> children;
+ private final Artifact destination;
+
+ /**
+ * @param children list to add result of <code>destination.getDescendants()</code> to
+ * @param destination
+ */
+ public FetchAndAddDescendantsOperation(List<Artifact> children, Artifact destination) {
+ super("Fetch and Add Descendants", Activator.PLUGIN_ID);
+ this.children = children;
+ this.destination = destination;
+ }
+
+ @Override
+ protected void doWork(IProgressMonitor monitor) throws Exception {
+ try {
+ children.addAll(this.destination.getDescendants());
+ } catch (OseeCoreException ex) {
+ throw new OseeCoreException(String.format("Unable to get artifact children: artifact:[%s] branch:[%s]",
+ this.destination.getGuid(), this.destination.getBranch().getGuid()), ex);
+ }
+ }
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationParameter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationParameter.java
index e693e08123f..a0808aeceff 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationParameter.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationParameter.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
* Example:
*
* <pre>
+ * {@code
* ...
* ArtifactImportOperationParameter <b>importParams</b> = new ArtifactImportOperationParameter();
* importParameters.setSourceFile(sourceFile);
@@ -39,6 +40,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
* ...
* IOperation operation = ArtifactImportOperationFactory.createOperation(<b>importParams</b>);
* ...
+ * }
* </pre>
*/
public class ArtifactImportOperationParameter {

Back to the top