本文整理汇总了Java中org.alfresco.service.cmr.dictionary.DictionaryService.getAllTypes方法的典型用法代码示例。如果您正苦于以下问题:Java DictionaryService.getAllTypes方法的具体用法?Java DictionaryService.getAllTypes怎么用?Java DictionaryService.getAllTypes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.dictionary.DictionaryService
的用法示例。
在下文中一共展示了DictionaryService.getAllTypes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: matchTypeDefinition
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static TypeDefinition matchTypeDefinition(String string, NamespacePrefixResolver namespacePrefixResolver, DictionaryService dictionaryService)
{
QName search = QName.createQName(expandQName(string, namespacePrefixResolver));
TypeDefinition typeDefinition = dictionaryService.getType(search);
QName match = null;
if (typeDefinition == null)
{
for (QName definition : dictionaryService.getAllTypes())
{
if (definition.getNamespaceURI().equalsIgnoreCase(search.getNamespaceURI()))
{
if (definition.getLocalName().equalsIgnoreCase(search.getLocalName()))
{
if (match == null)
{
match = definition;
}
else
{
throw new QueryModelException("Ambiguous data datype " + string);
}
}
}
}
}
else
{
return typeDefinition;
}
if (match == null)
{
return null;
}
else
{
return dictionaryService.getType(match);
}
}
示例2: matchTypeDefinition
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static TypeDefinition matchTypeDefinition(String defaultNameSpaceUri, NamespacePrefixResolver namespacePrefixResolver, DictionaryService dictionaryService, String string)
{
QName search = QName.createQName(expandQName(defaultNameSpaceUri, namespacePrefixResolver, string));
TypeDefinition typeDefinition = dictionaryService.getType(QName.createQName(expandQName(defaultNameSpaceUri, namespacePrefixResolver, string)));
QName match = null;
if (typeDefinition == null)
{
for (QName definition : dictionaryService.getAllTypes())
{
if (definition.getNamespaceURI().equalsIgnoreCase(search.getNamespaceURI()))
{
if (definition.getLocalName().equalsIgnoreCase(search.getLocalName()))
{
if (match == null)
{
match = definition;
}
else
{
throw new DictionaryException("Ambiguous data datype " + string);
}
}
}
}
}
else
{
return typeDefinition;
}
if (match == null)
{
return null;
}
else
{
return dictionaryService.getType(match);
}
}