本文整理了Java中org.intermine.metadata.Util.unqualifiedName()
方法的一些代码示例,展示了Util.unqualifiedName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.unqualifiedName()
方法的具体详情如下:
包路径:org.intermine.metadata.Util
类名称:Util
方法名:unqualifiedName
[英]Returns the unqualified class name from a fully qualified class name
[中]从完全限定的类名返回非限定的类名
代码示例来源:origin: intermine/intermine
/**
* Returns unqualified name of class described by this ClassDescriptor.
*
* @return unqualified name of the described Class
*/
public String getUnqualifiedName() {
return Util.unqualifiedName(className);
}
代码示例来源:origin: org.intermine/intermine-model
/**
* Returns unqualified name of class described by this ClassDescriptor.
*
* @return unqualified name of the described Class
*/
public String getUnqualifiedName() {
return Util.unqualifiedName(className);
}
代码示例来源:origin: intermine/intermine
/**
* Retrieve a map from key name to PrimaryKey object. The Map contains all the primary keys
* that exist on a particular class, without performing any recursion.
*
* @param cld the ClassDescriptor to fetch primary keys for
* @return the Map from key names to PrimaryKeys
*/
public static Map<String, PrimaryKey> getPrimaryKeys(ClassDescriptor cld) {
Map<String, PrimaryKey> keyMap = primaryKeyCache.get(cld);
if (keyMap == null) {
keyMap = new LinkedHashMap<String, PrimaryKey>();
Properties keys = getKeyProperties(cld.getModel().getName());
String cldName = Util.unqualifiedName(cld.getName());
Properties cldKeys = Util.getPropertiesStartingWith(cldName, keys);
cldKeys = Util.stripStart(cldName, cldKeys);
List<String> keyNames = new ArrayList<String>();
for (Object key : cldKeys.keySet()) {
if (key instanceof String) {
keyNames.add((String) key);
}
}
Collections.sort(keyNames);
for (String keyName : keyNames) {
PrimaryKey key = new PrimaryKey(keyName, (String) cldKeys.get(keyName), cld);
keyMap.put(keyName, key);
}
primaryKeyCache.put(cld, keyMap);
}
return keyMap;
}
代码示例来源:origin: org.intermine/intermine-model
/**
* Retrieve a map from key name to PrimaryKey object. The Map contains all the primary keys
* that exist on a particular class, without performing any recursion.
*
* @param cld the ClassDescriptor to fetch primary keys for
* @return the Map from key names to PrimaryKeys
*/
public static Map<String, PrimaryKey> getPrimaryKeys(ClassDescriptor cld) {
Map<String, PrimaryKey> keyMap = primaryKeyCache.get(cld);
if (keyMap == null) {
keyMap = new LinkedHashMap<String, PrimaryKey>();
Properties keys = getKeyProperties(cld.getModel().getName());
String cldName = Util.unqualifiedName(cld.getName());
Properties cldKeys = Util.getPropertiesStartingWith(cldName, keys);
cldKeys = Util.stripStart(cldName, cldKeys);
List<String> keyNames = new ArrayList<String>();
for (Object key : cldKeys.keySet()) {
if (key instanceof String) {
keyNames.add((String) key);
}
}
Collections.sort(keyNames);
for (String keyName : keyNames) {
PrimaryKey key = new PrimaryKey(keyName, (String) cldKeys.get(keyName), cld);
keyMap.put(keyName, key);
}
primaryKeyCache.put(cld, keyMap);
}
return keyMap;
}
内容来源于网络,如有侵权,请联系作者删除!