本文整理了Java中org.intermine.metadata.Model.hasClassDescriptor()
方法的一些代码示例,展示了Model.hasClassDescriptor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.hasClassDescriptor()
方法的具体详情如下:
包路径:org.intermine.metadata.Model
类名称:Model
方法名:hasClassDescriptor
[英]Return true if named ClassDescriptor is found in the model. Looking for fully qualified classname, eg. org.intermine.model.bio.Gene.
[中]如果在模型中找到命名的ClassDescriptor,则返回true。寻找完全限定的类名,例如org。间歇。模型生物基因
代码示例来源:origin: intermine/intermine
private void findSuperDescriptors() throws MetaDataException {
// descriptors for superclasses and interfaces
if (superNames.size() > 0) {
for (String superName : superNames) {
if (!model.hasClassDescriptor(superName)) {
if (!"java.lang.Object".equals(superName)) {
throw new MetaDataException("No ClassDescriptor for superclass or interface"
+ " (" + superName + ") found in model.");
}
} else {
ClassDescriptor superDescriptor = model.getClassDescriptorByName(superName);
superDescriptors.add(superDescriptor);
}
}
}
}
代码示例来源:origin: org.intermine/intermine-model
private void findSuperDescriptors() throws MetaDataException {
// descriptors for superclasses and interfaces
if (superNames.size() > 0) {
for (String superName : superNames) {
if (!model.hasClassDescriptor(superName)) {
if (!"java.lang.Object".equals(superName)) {
throw new MetaDataException("No ClassDescriptor for superclass or interface"
+ " (" + superName + ") found in model.");
}
} else {
ClassDescriptor superDescriptor = model.getClassDescriptorByName(superName);
superDescriptors.add(superDescriptor);
}
}
}
}
代码示例来源:origin: org.intermine/intermine-api
if ("bag-type".equals(qName)) {
type = attrs.getValue("type");
if (!model.hasClassDescriptor(pkg + "." + type)) {
throw new SAXException("Type was not found in model: " + type);
代码示例来源:origin: intermine/intermine
if ("bag-type".equals(qName)) {
type = attrs.getValue("type");
if (!model.hasClassDescriptor(pkg + "." + type)) {
throw new SAXException("Type was not found in model: " + type);
代码示例来源:origin: org.intermine/intermine-api
if (model.hasClassDescriptor(bagClsName)) {
bag = new InterMineBag(bagName, bagType, bagDescription,
dateCreated, BagState.NOT_CURRENT, osw.getObjectStore(),
代码示例来源:origin: intermine/intermine
if (model.hasClassDescriptor(bagClsName)) {
bag = new InterMineBag(bagName, bagType, bagDescription,
dateCreated, BagState.NOT_CURRENT, osw.getObjectStore(),
代码示例来源:origin: org.intermine/intermine-objectstore
String end = model.getPackageName() + "." + queryBits[i + 2];
if (!model.hasClassDescriptor(start)) {
throw new IllegalArgumentException("Class not found in model: " + start);
} else if (!model.hasClassDescriptor(end)) {
throw new IllegalArgumentException("Class not found in model: " + end);
代码示例来源:origin: org.intermine/bio-core
/**
* Convenience method to test whether an InterMineObject is an instance of the given class name
* without needing to import the class itself. This is used to refer to classes that may not
* be present in particular data models.
* @param model the data model
* @param obj an object to test
* @param clsName test whether obj is an instance of this class
* @return true if obj is an instance of clsName
*/
public static boolean isInstance(Model model, InterMineObject obj, String clsName) {
if (model.hasClassDescriptor(clsName)) {
Class<? extends FastPathObject> cls = model.getClassDescriptorByName(clsName).getType();
if (DynamicUtil.isInstance(obj, cls)) {
return true;
}
}
return false;
}
代码示例来源:origin: intermine/intermine
String end = model.getPackageName() + "." + queryBits[i + 2];
if (!model.hasClassDescriptor(start)) {
throw new IllegalArgumentException("Class not found in model: " + start);
} else if (!model.hasClassDescriptor(end)) {
throw new IllegalArgumentException("Class not found in model: " + end);
代码示例来源:origin: org.intermine/intermine-model
if (cld.getModel().hasClassDescriptor(referencedType)) {
referencedClassDesc = cld.getModel().getClassDescriptorByName(referencedType);
代码示例来源:origin: intermine/intermine
if (cld.getModel().hasClassDescriptor(referencedType)) {
referencedClassDesc = cld.getModel().getClassDescriptorByName(referencedType);
内容来源于网络,如有侵权,请联系作者删除!