本文整理汇总了Java中org.ihtsdo.otf.tcc.api.lang.LanguageCode.EN_US属性的典型用法代码示例。如果您正苦于以下问题:Java LanguageCode.EN_US属性的具体用法?Java LanguageCode.EN_US怎么用?Java LanguageCode.EN_US使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.ihtsdo.otf.tcc.api.lang.LanguageCode
的用法示例。
在下文中一共展示了LanguageCode.EN_US属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNewConcept
public ConceptChronicleBI createNewConcept() throws ValidationException, IOException, InvalidCAB, ContradictionException {
String fsn = getConceptFSN();
String prefTerm = getConceptPT();
LOG.debug("Creating concept {}", fsn);
UUID isA = Snomed.IS_A.getUuids()[0];
UUID parentCons[] = new UUID[parents.size()];
for (int i = 0; i < parents.size(); i++) {
parentCons[i] = parents.get(i).getPrimordialUuid();
}
IdDirective idDir = IdDirective.GENERATE_HASH;
LanguageCode lc = LanguageCode.EN_US;
UUID module = Snomed.CORE_MODULE.getLenient().getPrimordialUuid();
ConceptCB newConCB = new ConceptCB(fsn, prefTerm, lc, isA, idDir, module, parentCons);
newConCB.setDefined(!isPrimitive);
ConceptChronicleBI newCon = OTFUtility.getBuilder().construct(newConCB);
// OTFUtility.addUncommitted(newCon);
return newCon;
}
示例2: createNewRefsetConcept
private ConceptChronicleBI createNewRefsetConcept(ConceptVersionBI parent, String fsn, String prefTerm, boolean isAnnotated) throws IOException, InvalidCAB, ContradictionException {
LanguageCode lc = LanguageCode.EN_US;
UUID isA = Snomed.IS_A.getUuids()[0];
IdDirective idDir = IdDirective.GENERATE_HASH;
UUID module = Snomed.CORE_MODULE.getLenient().getPrimordialUuid();
UUID parents[] = new UUID[1];
parents[0] = parent.getPrimordialUuid();
ConceptCB newConCB = new ConceptCB(fsn, prefTerm, lc, isA, idDir, module, parents);
ConceptChronicleBI newCon = appDb.getBuilder().construct(newConCB);
newCon.setAnnotationStyleRefex(isAnnotated);
appDb.getDB().addUncommitted(newCon);
return newCon;
}
示例3: createNewConcept
private ConceptChronicleBI createNewConcept(ConceptVersionBI con) throws IOException, InvalidCAB, ContradictionException {
String fsn = "New Test Concept (observable entity)";
String prefTerm = "New Test Concept PT";
LanguageCode lc = LanguageCode.EN_US;
UUID isA = Snomed.IS_A.getUuids()[0];
IdDirective idDir = IdDirective.GENERATE_HASH;
UUID module = Snomed.CORE_MODULE.getLenient().getPrimordialUuid();
UUID parents[] = new UUID[1];
parents[0] = con.getPrimordialUuid();
ConceptCB newConCB = new ConceptCB(fsn, prefTerm, lc, isA, idDir, module, parents);
ConceptChronicleBI newCon = appDb.getBuilder().construct(newConCB);
appDb.getDB().addUncommitted(newCon);
return newCon;
}
示例4: createNewConceptBlueprint
/**
* Creates the new concept blueprint
*
* @param parent the parent
* @param fsn the fsn
* @param prefTerm the pref term
* @return the concept cb
* @throws ValidationException the validation exception
* @throws IOException Signals that an I/O exception has occurred.
* @throws InvalidCAB the invalid cab
* @throws ContradictionException the contradiction exception
*/
private ConceptCB createNewConceptBlueprint(ConceptChronicleBI parent,
String fsn, String prefTerm) throws ValidationException, IOException,
InvalidCAB, ContradictionException {
if (parent == null) {
throw new IOException("Parent is unexpectedly null");
}
if (fsn == null) {
throw new IOException("FN is unexpectedly null");
}
if (prefTerm == null) {
throw new IOException("PT is unexpectedly null");
}
// Assume language US English
LanguageCode lc = LanguageCode.EN_US;
// Assume hierarchy is represented as IS_A rel
UUID isA = Snomed.IS_A.getUuids()[0];
// Compute UUIDs in standard way
IdDirective idDir = IdDirective.GENERATE_HASH;
// Assume module should be SNOMED core module (this may be something to
// change)
UUID module = Snomed.CORE_MODULE.getLenient().getPrimordialUuid();
// Create single parent
UUID parentUUIDs[] = new UUID[1];
parentUUIDs[0] = parent.getPrimordialUuid();
return new ConceptCB(fsn, prefTerm, lc, isA, idDir, module, parentUUIDs);
}
示例5: createNewConceptBlueprint
public static ConceptCB createNewConceptBlueprint(ConceptChronicleBI parent, String fsn, String prefTerm) throws ValidationException, IOException, InvalidCAB, ContradictionException {
LanguageCode lc = LanguageCode.EN_US;
UUID isA = Snomed.IS_A.getUuids()[0];
IdDirective idDir = IdDirective.GENERATE_HASH;
UUID module = Snomed.CORE_MODULE.getLenient().getPrimordialUuid();
UUID parentUUIDs[] = new UUID[1];
parentUUIDs[0] = parent.getPrimordialUuid();
return new ConceptCB(fsn, prefTerm, lc, isA, idDir, module, parentUUIDs);
}
示例6: createNewDescription
public void createNewDescription(ConceptChronicleBI con, int i) throws IOException, InvalidCAB, ContradictionException {
DescriptionCAB newDesc = new DescriptionCAB(con.getConceptNid(),
getTypeNid(i),
LanguageCode.EN_US,
syns.get(i).getTerm(),
syns.get(i).isInitialCaseSig(),
IdDirective.GENERATE_HASH);
OTFUtility.getBuilder().construct(newDesc);
// OTFUtility.addUncommitted(con);
}
示例7: createUserConcept
/**
* 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();
}
}
示例8: createNewDescription
public static void createNewDescription(int conNid, String term) throws IOException, InvalidCAB, ContradictionException {
DescriptionCAB newDesc = new DescriptionCAB(conNid, SnomedMetadataRf2.SYNONYM_RF2.getNid(), LanguageCode.EN_US, term, false, IdDirective.GENERATE_HASH);
getBuilder().construct(newDesc);
addUncommitted(conNid);
}
示例9: createNewDescription
private void createNewDescription(ConceptVersionBI con) throws IOException, InvalidCAB, ContradictionException {
DescriptionCAB newDesc = new DescriptionCAB(con.getConceptNid(), SnomedMetadataRfx.getDES_SYNONYM_NID(), LanguageCode.EN_US,
"Test Description #1", true, IdDirective.GENERATE_HASH);
appDb.getBuilder().construct(newDesc);
appDb.getDB().addUncommitted(con);
}