當前位置: 首頁>>代碼示例>>Java>>正文


Java EditCoordinate類代碼示例

本文整理匯總了Java中org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate的典型用法代碼示例。如果您正苦於以下問題:Java EditCoordinate類的具體用法?Java EditCoordinate怎麽用?Java EditCoordinate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EditCoordinate類屬於org.ihtsdo.otf.tcc.api.coordinate包,在下文中一共展示了EditCoordinate類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setActiveStatus

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
public void setActiveStatus(DescriptionVersionBI desc, Status status) throws IOException, ContradictionException, InvalidCAB {
    DescriptionCAB descCAB = desc.makeBlueprint(vc, IdDirective.PRESERVE, RefexDirective.EXCLUDE);
    descCAB.setStatus(status);
    int authorNid = TermAux.USER.getLenient().getConceptNid();
    int editPathNid = TermAux.SNOMED_CORE.getLenient().getConceptNid();
    EditCoordinate ec = new EditCoordinate(authorNid, Snomed.CORE_MODULE.getLenient().getNid(), editPathNid);
    TerminologyBuilderBI tb = Ts.get().getTerminologyBuilder(ec, vc);
    DescriptionChronicleBI descChronicle = tb.construct(descCAB);
    Ts.get().addUncommitted(desc.getEnclosingConcept().getVersion(vc));
    Ts.get().commit();
    System.out.println(descChronicle.getVersion(vc));
}
 
開發者ID:Apelon-VA,項目名稱:OTF-Query-Services,代碼行數:13,代碼來源:TermstoreChanges.java

示例2: modifyDesc

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
public void modifyDesc(String text, int nid) throws IOException, ContradictionException, InvalidCAB {
    DescriptionVersionBI desc = Ts.get().getConceptVersion(vc, nid).getPreferredDescription();
    DescriptionCAB descCAB = desc.makeBlueprint(vc, IdDirective.PRESERVE, RefexDirective.EXCLUDE);
    descCAB.setText(text);
    int authorNid = TermAux.USER.getLenient().getConceptNid();
    int editPathNid = TermAux.SNOMED_CORE.getLenient().getConceptNid();
    EditCoordinate ec = new EditCoordinate(authorNid, Snomed.CORE_MODULE.getLenient().getNid(), editPathNid);
    TerminologyBuilderBI tb = Ts.get().getTerminologyBuilder(ec, vc);
    DescriptionChronicleBI descChronicle = tb.construct(descCAB);
    Ts.get().addUncommitted(desc.getEnclosingConcept().getVersion(vc));
    Ts.get().commit();
}
 
開發者ID:Apelon-VA,項目名稱:OTF-Query-Services,代碼行數:13,代碼來源:TermstoreChanges.java

示例3: setUp

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
@Before
public void setUp() {
    try {
        int authorNid   = TermAux.USER.getLenient().getConceptNid();
        int editPathNid = TermAux.WB_AUX_PATH.getLenient().getConceptNid();

        ec = new EditCoordinate(authorNid, Snomed.CORE_MODULE.getLenient().getNid(), editPathNid);
        vc = Ts.get().getMetadataVC();
    } catch (IOException ex) {
        Logger.getLogger(LuceneTest.class.getName()).log(Level.SEVERE, null, ex);
    }
}
 
開發者ID:Apelon-VA,項目名稱:OTF-Query-Services,代碼行數:13,代碼來源:LuceneTest.java

示例4: addRel

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
private void addRel(ConceptChronicleBI source, UUID target) throws ValidationException, IOException, InvalidCAB, ContradictionException
{
	RelationshipCAB rCab = new RelationshipCAB(source.getPrimordialUuid(), Snomed.IS_A.getUuids()[0], target, 0, RelationshipType.STATED_ROLE, 
			IdDirective.GENERATE_HASH);
	
	ts_.getTerminologyBuilder(new EditCoordinate(TermAux.USER.getLenient().getConceptNid(), TermAux.UNSPECIFIED_MODULE.getLenient().getNid(), 
			getNid(LOINC_PATH)), StandardViewCoordinates.getWbAuxiliary()).construct(rCab);
	ts_.addUncommitted(source);
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:10,代碼來源:LOINCSpreadsheetRules.java

示例5: addRel

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
protected void addRel(ConceptChronicleBI source, UUID target, UUID path) throws ValidationException, IOException, InvalidCAB, ContradictionException
{
	RelationshipCAB rCab = new RelationshipCAB(source.getPrimordialUuid(), Snomed.IS_A.getUuids()[0], target, 0, RelationshipType.STATED_ROLE, 
			IdDirective.GENERATE_HASH);
	
	ts_.getTerminologyBuilder(new EditCoordinate(TermAux.USER.getLenient().getConceptNid(), TermAux.UNSPECIFIED_MODULE.getLenient().getNid(), 
			getNid(path)), StandardViewCoordinates.getWbAuxiliary()).construct(rCab);
	ts_.addUncommitted(source);
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:10,代碼來源:BaseSpreadsheetCode.java

示例6: getEC

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
/**
 * Returns the ec.
 *
 * @return the ec
 * @throws ValidationException the validation exception
 * @throws IOException Signals that an I/O exception has occurred.
 */
public static EditCoordinate getEC() throws ValidationException, IOException {
  int authorNid = TermAux.USER.getLenient().getConceptNid();
  int module = Snomed.CORE_MODULE.getLenient().getNid();
  // Should be able to be wb aux but this causes weird problems
  int editPathNid = TermAux.WB_AUX_PATH.getLenient().getConceptNid();
  return new EditCoordinate(authorNid, module, editPathNid);
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:15,代碼來源:PathBuilder.java

示例7: getEC

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
EditCoordinate getEC() throws ValidationException, IOException {
       int authorNid   = TermAux.USER.getLenient().getConceptNid();
       int module = Snomed.CORE_MODULE.getLenient().getNid();
       int editPathNid = TermAux.SNOMED_CORE.getLenient().getConceptNid();

       return new EditCoordinate(authorNid, module, editPathNid);
}
 
開發者ID:IHTSDO,項目名稱:example-OTF-code,代碼行數:8,代碼來源:AppInitializer.java

示例8: createUserConcept

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
/**
 * Create a concept in the DB, for the specified user.  Only call this if {@link #alreadyExists(User)) return false
 */
public static void createUserConcept(User user) throws IOException, InvalidCAB, ContradictionException
{
	logger.info("Creating user " + toString(user) + " in DB");
	AppContext.getRuntimeGlobals().disableAllCommitListeners();
	try
	{
		BdbTerminologyStore ts = ExtendedAppContext.getDataStore();
		String fsn = user.getUniqueFullName();
		String preferredName = user.getFullName();
		String logonName = user.getUniqueLogonName();
		UUID userUUID = UUID.fromString(user.getUUID());

		LanguageCode lc = LanguageCode.EN_US;
		UUID isA = Snomed.IS_A.getUuids()[0];
		IdDirective idDir = IdDirective.PRESERVE_CONCEPT_REST_HASH;
		UUID module = TermAux.TERM_AUX_MODULE.getUuids()[0];
		UUID parents[] = new UUID[] { TermAux.USER.getUuids()[0] };

		ConceptCB cab = new ConceptCB(fsn, preferredName, lc, isA, idDir, module, userUUID, parents);

		DescriptionCAB dCab = new DescriptionCAB(cab.getComponentUuid(), Snomed.SYNONYM_DESCRIPTION_TYPE.getUuids()[0], lc, logonName, true,
				IdDirective.GENERATE_HASH);
		dCab.getProperties().put(ComponentProperty.MODULE_ID, module);

		//Mark it as acceptable
		RefexCAB rCabAcceptable = new RefexCAB(RefexType.CID, dCab.getComponentUuid(), Snomed.US_LANGUAGE_REFEX.getUuids()[0], IdDirective.GENERATE_HASH,
				RefexDirective.EXCLUDE);
		rCabAcceptable.put(ComponentProperty.COMPONENT_EXTENSION_1_ID, SnomedMetadataRf2.ACCEPTABLE_RF2.getUuids()[0]);
		rCabAcceptable.getProperties().put(ComponentProperty.MODULE_ID, module);
		dCab.addAnnotationBlueprint(rCabAcceptable);

		cab.addDescriptionCAB(dCab);
		
		//TODO store roles on the concept

		//Build this on the lowest level path, otherwise, other code that references this will fail (as it doesn't know about custom paths)
		ConceptChronicleBI newCon = ts.getTerminologyBuilder(
				new EditCoordinate(TermAux.USER.getLenient().getConceptNid(), TermAux.TERM_AUX_MODULE.getLenient().getNid(), TermAux.WB_AUX_PATH.getLenient()
						.getConceptNid()), StandardViewCoordinates.getWbAuxiliary()).construct(cab);
		ts.addUncommitted(newCon);
		ts.commit(newCon);
	}
	finally
	{
		AppContext.getRuntimeGlobals().enableAllCommitListeners();
	}
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:51,代碼來源:GenerateUsers.java

示例9: getBuilder

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
public static TerminologyBuilderBI getBuilder(EditCoordinate ec, ViewCoordinate vc) {
	return new BdbTermBuilder(ec, vc);
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:4,代碼來源:OTFUtility.java

示例10: getEC

import org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate; //導入依賴的package包/類
/**
 * Returns the edit coordinate.
 *
 * @return the edit coordinate
 */
protected final EditCoordinate getEC() {
  return OTFUtility.getEditCoordinate();
}
 
開發者ID:Apelon-VA,項目名稱:ISAAC,代碼行數:9,代碼來源:CommonBase.java


注:本文中的org.ihtsdo.otf.tcc.api.coordinate.EditCoordinate類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。