本文整理汇总了Java中org.LexGrid.LexBIG.Utility.Constructors类的典型用法代码示例。如果您正苦于以下问题:Java Constructors类的具体用法?Java Constructors怎么用?Java Constructors使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Constructors类属于org.LexGrid.LexBIG.Utility包,在下文中一共展示了Constructors类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getEditActions
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
private Vector<String> getEditActions(
HistoryService hs, String codingSchemeName, String vers, String ltag,
String code) throws LBException {
try {
Entity c = new SearchUtils(lbSvc).getConceptByCode(codingSchemeName, vers, ltag, code);
if (c == null)
return null;
NCIChangeEventList list =
hs.getEditActionList(Constructors.createConceptReference(code,
null), null, null);
/*
* Boolean isActive = c.isIsActive(); NCIChangeEventList list =
* null; if (isActive != null && isActive.equals(Boolean.FALSE)) {
* list =
* hs.getDescendants(Constructors.createConceptReference(code,
* null)); } else { list =
* hs.getEditActionList(Constructors.createConceptReference(code,
* null), null, null); }
*/
return getEditActions(codingSchemeName, vers, ltag, code, list);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:26,代码来源:TestHistoryUtils.java
示例2: test_getConceptChangeVersions
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public void test_getConceptChangeVersions(String code) throws Exception {
// Test Creation Version
println(ObjectToString.toString(_hs
.getConceptCreationVersion(Constructors.createConceptReference(
code, null))));
// Test Change Version
println(ObjectToString.toString(_hs.getConceptChangeVersions(
Constructors.createConceptReference(code, null), null, null)));
Date after = getDate(2004, Calendar.APRIL, 25);
Date before = getDate(2004, Calendar.AUGUST, 25);
println(ObjectToString.toString(_hs.getConceptChangeVersions(
Constructors.createConceptReference(code, null), after, before)));
println(ObjectToString.toString(_hs.getConceptChangeVersions(
Constructors.createConceptReference(code, null), null, before)));
println(ObjectToString.toString(_hs.getConceptChangeVersions(
Constructors.createConceptReference(code, null), after, null)));
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:HistoryTests.java
示例3: findConceptsByCode
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public List findConceptsByCode(String conceptCode, boolean includeRetiredConcepts, int rowCount, String vocabName)
throws EVSException {
List<EVSConcept> evsConcepts = new ArrayList<EVSConcept>();
try {
CodedNodeSet cns = service.getNodeSet(vocabName, null, null);
cns = cns.restrictToMatchingProperties(
Constructors.createLocalNameList("conceptCode"),
null,
conceptCode,
MatchAlgorithms.exactMatch.name(),
null
);
ResolvedConceptReferencesIterator results = resolveNodeSet(cns, includeRetiredConcepts);
evsConcepts = getEVSConcepts(results);
} catch (Exception e) {
log.error("Error finding concept for code ["+conceptCode+"]", e);
throw new EVSException("Error finding concept for code ["+conceptCode+"]", e);
}
return evsConcepts;
}
开发者ID:NCIP,项目名称:cadsr-semantic-tools,代码行数:22,代码来源:LexEVSQueryServiceImpl.java
示例4: createDirectoryResultWithEntryFullVersionDescriptions
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public static <T> DirectoryResult<T> createDirectoryResultWithEntryFullVersionDescriptions(
LexBIGService lexBigService,
LexEvsToCTS2Transformer<T,CodingScheme,?,?> transformer,
CodingSchemeRendering[] lexCodeSchemeRenderings,
boolean atEnd2){
List<T> cts2EntryList = new ArrayList<T>();
boolean atEnd = true;
DirectoryResult<T> cts2DirectoryResult = new DirectoryResult<T>(cts2EntryList, atEnd);
if(lexCodeSchemeRenderings != null){
for (CodingSchemeRendering lexCodingSchemeRendering : lexCodeSchemeRenderings) {
String lexCodingSchemeName = lexCodingSchemeRendering.getCodingSchemeSummary().getCodingSchemeURI();
String lexCodingSchemeVersion = lexCodingSchemeRendering.getCodingSchemeSummary().getRepresentsVersion();
CodingSchemeVersionOrTag lexTagOrVersion = Constructors.createCodingSchemeVersionOrTagFromVersion(lexCodingSchemeVersion);
try {
CodingScheme lexCodingScheme = lexBigService.resolveCodingScheme(lexCodingSchemeName, lexTagOrVersion);
cts2EntryList.add(transformer.transformFullDescription(lexCodingScheme));
} catch (LBException e) {
throw new RuntimeException(e);
}
}
cts2DirectoryResult = new DirectoryResult<T>(cts2EntryList, atEnd);
}
return cts2DirectoryResult;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:27,代码来源:CommonResourceUtils.java
示例5: getLexCodingScheme
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public static CodingScheme getLexCodingScheme(
LexBIGService lexBigService,
CodingSchemeRendering lexCodingSchemeRendering) {
CodingScheme lexCodingScheme = null;
String lexCodingSchemeName = null;
String lexVersion = null;
CodingSchemeVersionOrTag lexTagOrVersion = null;
try {
if(lexCodingSchemeRendering != null){
lexCodingSchemeName = lexCodingSchemeRendering.getCodingSchemeSummary().getCodingSchemeURI();
lexVersion = lexCodingSchemeRendering.getCodingSchemeSummary().getRepresentsVersion();
lexTagOrVersion = Constructors.createCodingSchemeVersionOrTagFromVersion(lexVersion);
}
lexCodingScheme = lexBigService.resolveCodingScheme(lexCodingSchemeName, lexTagOrVersion);
} catch (LBException e) {
throw new RuntimeException(e);
}
return lexCodingScheme;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:CommonResourceUtils.java
示例6: getPredicateUri
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
@Override
public String getPredicateUri(
String codingSchemeUri,
String codingSchemeVersion,
String associationName) {
CodingScheme codingScheme;
try {
codingScheme = this.lexBigService.resolveCodingScheme(
codingSchemeUri,
Constructors.createCodingSchemeVersionOrTagFromVersion(codingSchemeVersion));
} catch (LBException e) {
throw new RuntimeException(e);
}
SupportedAssociation supportedAssociation =
this.findSupportedAssociation(
associationName,
codingScheme.getMappings().getSupportedAssociation());
String uri = null;
if(supportedAssociation != null){
uri = supportedAssociation.getUri();
}
return uri;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:27,代码来源:LexEvsSupportedPropertiesUriHandler.java
示例7: toCodingSchemeReference
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
private Set<CodingSchemeReference> toCodingSchemeReference(Iterable<NameOrURI> codeSystemVersions){
Set<CodingSchemeReference> returnSet = new HashSet<CodingSchemeReference>();
for(NameOrURI version : codeSystemVersions){
NameVersionPair pair =
this.versionNameConverter.fromCts2VersionName(version.getName());
CodingSchemeReference ref = new CodingSchemeReference();
ref.setCodingScheme(pair.getName());
ref.setVersionOrTag(Constructors.createCodingSchemeVersionOrTagFromVersion(pair.getVersion()));
returnSet.add(ref);
}
return returnSet;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:17,代码来源:SearchExtensionEntityQueryService.java
示例8: read
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
@Override
public MapVersion read(NameOrURI identifier, ResolvedReadContext readContext) {
String name;
if(identifier.getName() != null){
name = identifier.getName();
if(!this.nameConverter.isValidVersionName(name)){
return null;
}
} else {
throw new UnsupportedOperationException("Cannot resolve by DocumentURI yet.");
}
NameVersionPair namePair = this.nameConverter.fromCts2VersionName(name);
CodingSchemeVersionOrTag version =
Constructors.createCodingSchemeVersionOrTagFromVersion(namePair.getVersion());
return this.getByVersionIdOrTag
(ModelUtils.nameOrUriFromName(
namePair.getName()),
version);
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:LexEvsMapVersionReadService.java
示例9: restrict
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public CodedNodeGraphDirectoryBuilder restrict(AssociationQueryServiceRestrictions restrictions){
if(restrictions != null &&
restrictions.getPredicate() != null &&
restrictions.getPredicate().getEntityName() != null &&
restrictions.getPredicate().getEntityName().getName() != null){
String predicateName = restrictions.getPredicate().getEntityName().getName();
try {
this.updateState(
this.getState().restrictToAssociations(Constructors.createNameAndValueList(predicateName), null));
} catch (LBException e) {
throw new RuntimeException(e);
}
}
return this;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:18,代码来源:CodedNodeGraphDirectoryBuilder.java
示例10: getByVersionIdOrTag
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
protected T getByVersionIdOrTag(
NameOrURI parentIdentifier,
CodingSchemeVersionOrTag convertTag) {
String id;
if(parentIdentifier.getName() != null){
id = parentIdentifier.getName();
} else {
id = parentIdentifier.getUri();
}
CodingSchemeVersionOrTag csvt;
if(convertTag.getTag() != null){
csvt = Constructors.createCodingSchemeVersionOrTagFromTag(convertTag.getTag());
} else {
csvt = Constructors.createCodingSchemeVersionOrTagFromVersion(convertTag.getVersion());
}
CodingScheme codingScheme = this.resolve(id,csvt);
if(codingScheme != null && this.isValidCodingScheme(codingScheme)){
return this.transform(codingScheme);
} else {
return null;
}
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:25,代码来源:AbstractLexEvsCodeSystemService.java
示例11: getInteratorFromMapping
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
private ResolvedConceptReferencesIterator getInteratorFromMapping(
MappingExtension mappingExtension,
String mapVersion,
String sourceEntityCode,
String relationsContainerName) throws LBException {
NameVersionPair nameVersionPair = this.nameConverter.fromCts2VersionName(mapVersion);
Mapping mapping = null;
CodingSchemeVersionOrTag csvt =
Constructors.createCodingSchemeVersionOrTagFromVersion(nameVersionPair.getVersion());
if(mappingExtension.isMappingCodingScheme(nameVersionPair.getName(), csvt)){
mapping = mappingExtension.getMapping(nameVersionPair.getName(), csvt, relationsContainerName);
mapping = mapping.restrictToCodes(Constructors.createConceptReferenceList(sourceEntityCode), SearchContext.SOURCE_CODES);
return mapping.resolveMapping();
}
return null;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:20,代码来源:LexEvsMapEntryReadService.java
示例12: getAvailableCodingSchemesString
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
private String getAvailableCodingSchemesString(){
List<String> schemes = new ArrayList<String>();
try {
for(CodingSchemeRendering scheme : lexBigService.getSupportedCodingSchemes().getCodingSchemeRendering()){
boolean isMapping =
mappingExtension.isMappingCodingScheme(
scheme.getCodingSchemeSummary().getCodingSchemeURI(),
Constructors.createCodingSchemeVersionOrTagFromVersion(
scheme.getCodingSchemeSummary().getRepresentsVersion()));
if(isMapping && scheme.getRenderingDetail().getVersionStatus().equals(CodingSchemeVersionStatus.ACTIVE)){
String name = scheme.getCodingSchemeSummary().getLocalName();
String version = scheme.getCodingSchemeSummary().getRepresentsVersion();
schemes.add(name + "[:" + version + "]");
}
}
} catch (LBException e) {
return "";
}
return StringUtils.join(schemes, ",");
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:22,代码来源:MapVersionBulkDownloadController.java
示例13: doGetCodingSchemeReferences
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
private Set<CodingSchemeReference> doGetCodingSchemeReferences(String name){
Set<CodingSchemeReference> references = new HashSet<CodingSchemeReference>();
try {
for(CodingSchemeRendering scheme : lexBigService.getSupportedCodingSchemes().getCodingSchemeRendering()){
if(scheme.getCodingSchemeSummary().getLocalName().equals(name)){
CodingSchemeReference reference = new CodingSchemeReference();
reference.setCodingScheme(
scheme.getCodingSchemeSummary().getCodingSchemeURI());
reference.setVersionOrTag(
Constructors.createCodingSchemeVersionOrTagFromVersion(scheme.getCodingSchemeSummary().getRepresentsVersion()));
references.add(reference);
}
}
} catch (LBInvocationException e) {
return null;
}
return references;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:21,代码来源:CodeSystemVersionBulkDownloadController.java
示例14: testOnlyActive
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
@Test
public void testOnlyActive() throws Exception {
ResolvedReadContext readContext = new ResolvedReadContext();
readContext.setActive(ActiveOrAll.ACTIVE_ONLY);
AbsoluteCodingSchemeVersionReference autos =
Constructors.createAbsoluteCodingSchemeVersionReference("urn:oid:11.11.0.1", "1.0");
LexBIGServiceImpl.defaultInstance().getServiceManager(null).
deactivateCodingSchemeVersion(autos, null);
// Build query using filters
CodeSystemVersionQueryImpl query = new CodeSystemVersionQueryImpl(null, null, readContext, null);
int expecting = 1;
int actual = this.service.count(query);
assertEquals("Expecting " + expecting + " but got " + actual, expecting, actual);
LexBIGServiceImpl.defaultInstance().getServiceManager(null).
activateCodingSchemeVersion(autos);
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:LexEvsCodeSystemVersionQueryServiceTestIT.java
示例15: testActiveAndInactive
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
@Test
public void testActiveAndInactive() throws Exception {
ResolvedReadContext readContext = new ResolvedReadContext();
readContext.setActive(ActiveOrAll.ACTIVE_AND_INACTIVE);
AbsoluteCodingSchemeVersionReference autos =
Constructors.createAbsoluteCodingSchemeVersionReference("urn:oid:11.11.0.1", "1.0");
LexBIGServiceImpl.defaultInstance().getServiceManager(null).
deactivateCodingSchemeVersion(autos, null);
// Build query using filters
CodeSystemVersionQueryImpl query = new CodeSystemVersionQueryImpl(null, null, readContext, null);
int expecting = 2;
int actual = this.service.count(query);
assertEquals("Expecting " + expecting + " but got " + actual, expecting, actual);
LexBIGServiceImpl.defaultInstance().getServiceManager(null).
activateCodingSchemeVersion(autos);
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:LexEvsCodeSystemVersionQueryServiceTestIT.java
示例16: getCodeDescription
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
protected static String getCodeDescription(LexBIGService lbsvc,
String scheme, CodingSchemeVersionOrTag csvt, String code)
throws LBException {
CodedNodeSet cns = lbsvc.getCodingSchemeConcepts(scheme, csvt);
cns =
cns.restrictToCodes(Constructors.createConceptReferenceList(code,
scheme));
ResolvedConceptReferenceList rcrl = null;
try {
rcrl = cns.resolveToList(null, _noopList, null, 1);
} catch (Exception ex) {
_logger
.error("WARNING: TreeUtils getCodeDescription cns.resolveToList throws exceptions");
return "null";
}
if (rcrl != null && rcrl.getResolvedConceptReferenceCount() > 0) {
EntityDescription desc =
rcrl.getResolvedConceptReference(0).getEntityDescription();
if (desc != null)
return desc.getContent();
}
return "<Not assigned>";
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:26,代码来源:ValueSetHierarchy.java
示例17: getEntities
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public CodedNodeSet getEntities(String codingSchemeURN, String codingSchemeVersion, String type) {
LocalNameList lnl = new LocalNameList();
lnl.addEntry(type);
CodedNodeSet cns = null;
try {
cns = lbSvc.getNodeSet(codingSchemeURN, Constructors.createCodingSchemeVersionOrTagFromVersion(codingSchemeVersion), lnl);
} catch (Exception ex) {
ex.printStackTrace();
}
return cns;
}
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:12,代码来源:MetathesaurusSearchUtils.java
示例18: getPropertyValues
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public HashMap getPropertyValues(String scheme, String version, String propertyType, String propertyName) {
HashMap hmap = new HashMap();
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
if (version != null) versionOrTag.setVersion(version);
try {
CodedNodeSet cns = getNodeSet(scheme, versionOrTag);
SortOptionList sortOptions = null;
LocalNameList filterOptions = null;
LocalNameList propertyNames = Constructors.createLocalNameList(propertyName);
CodedNodeSet.PropertyType[] propertyTypes = null;
boolean resolveObjects = true;
ResolvedConceptReferencesIterator iterator = cns.resolve(sortOptions, filterOptions, propertyNames,
propertyTypes, resolveObjects);
while (iterator != null && iterator.hasNext()) {
ResolvedConceptReference rcr = iterator.next();
Entity concept = rcr.getEntity();
Vector v = getPropertyValues(concept, propertyType, propertyName);
if (v != null) {
if (v.size() > 0) {
String key = concept.getEntityCode();
String value = (String) v.elementAt(0);
hmap.put(key, value);
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return hmap;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:32,代码来源:ConceptDetails.java
示例19: getCodeDescription
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
/**
* Returns the entity description for the given code.
*/
protected String getCodeDescription(LexBIGService lbsvc, String scheme, CodingSchemeVersionOrTag csvt, String code)
throws LBException {
CodedNodeSet cns = lbsvc.getCodingSchemeConcepts(scheme, csvt);
cns = cns.restrictToCodes(Constructors.createConceptReferenceList(code, scheme));
ResolvedConceptReferenceList rcrl = cns.resolveToList(null, noopList_, null, 1);
if (rcrl.getResolvedConceptReferenceCount() > 0) {
EntityDescription desc = rcrl.getResolvedConceptReference(0).getEntityDescription();
if (desc != null)
return desc.getContent();
}
return "<Not assigned>";
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:TreeUtils.java
示例20: run
import org.LexGrid.LexBIG.Utility.Constructors; //导入依赖的package包/类
public void run(String text)throws LBException{
CodingSchemeSummary css = Util.promptForCodeSystem();
if (css != null) {
LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
String scheme = css.getCodingSchemeURN();
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
csvt.setVersion(css.getRepresentsVersion());
CodedNodeSet nodes = lbSvc.getCodingSchemeConcepts(scheme, csvt)
.restrictToStatus(ActiveOption.ALL, null)
.restrictToMatchingDesignations(
text,
SearchDesignationOption.ALL,
MatchAlgorithms.DoubleMetaphoneLuceneQuery.toString(),
null);
// Sort by search engine recommendation & code ...
SortOptionList sortCriteria =
Constructors.createSortOptionList(new String[]{"matchToQuery", "code"});
// Analyze the result ...
ResolvedConceptReferenceList matches =
nodes.resolveToList(sortCriteria, null, null, 10);
if (matches.getResolvedConceptReferenceCount() > 0) {
for (Enumeration refs = matches.enumerateResolvedConceptReference(); refs.hasMoreElements(); ) {
ResolvedConceptReference ref = (ResolvedConceptReference) refs.nextElement();
Util.displayMessage("Matching code: " + ref.getConceptCode());
Util.displayMessage("\tDescription: " + ref.getEntityDescription().getContent());
}
} else {
Util.displayMessage("No match found!");
}
}
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:35,代码来源:SoundsLike.java
注:本文中的org.LexGrid.LexBIG.Utility.Constructors类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论