当前位置: 首页>>代码示例>>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;未经允许,请勿转载。