当前位置: 首页>>代码示例>>Java>>正文


Java DictionaryService.getProperty方法代码示例

本文整理汇总了Java中org.alfresco.service.cmr.dictionary.DictionaryService.getProperty方法的典型用法代码示例。如果您正苦于以下问题:Java DictionaryService.getProperty方法的具体用法?Java DictionaryService.getProperty怎么用?Java DictionaryService.getProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.alfresco.service.cmr.dictionary.DictionaryService的用法示例。


在下文中一共展示了DictionaryService.getProperty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateProperty

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public void updateProperty(DictionaryService dictionaryService, PropertyDefinitionWrapper propertyDefWrap)
{
    if (propertyDefWrap != null && propertyDefWrap.getPropertyDefinition().getDisplayName() == null)
    {
        AbstractPropertyDefinition<?> property = (AbstractPropertyDefinition<?>) propertyDefWrap.getPropertyDefinition();
        org.alfresco.service.cmr.dictionary.PropertyDefinition propDef = dictionaryService
                .getProperty(QName.createQName(property.getLocalNamespace(), property.getLocalName()));
        if (propDef != null)
        {
            String displayName = propDef.getTitle(dictionaryService);
            String description = propDef.getDescription(dictionaryService);
            property.setDisplayName(displayName == null ? property.getId() : displayName);
            property.setDescription(description == null ? property.getDisplayName() : description);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:17,代码来源:AbstractTypeDefinitionWrapper.java

示例2: getDataTypeDefinition

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static DataTypeDefinition getDataTypeDefinition(DictionaryService dictionaryService, QName propertyQname)
{
    if(propertyQname == null)
    {
        return null;
    }
    PropertyDefinition propDef = dictionaryService.getProperty(propertyQname);
    if(propDef == null)
    {
        return null;
    }
    return propDef.getDataType();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:14,代码来源:DBQuery.java

示例3: matchPropertyDefinition

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static PropertyDefinition matchPropertyDefinition(String defaultNameSpaceUri, NamespacePrefixResolver namespacePrefixResolver, DictionaryService dictionaryService, String string)
{
    QName search = QName.createQName(QueryParserUtils.expandQName(defaultNameSpaceUri, namespacePrefixResolver, string));
    PropertyDefinition propertyDefinition = dictionaryService.getProperty(QName.createQName(QueryParserUtils.expandQName(defaultNameSpaceUri, namespacePrefixResolver, string)));
    QName match = null;
    if (propertyDefinition == null)
    {
        for (QName definition : dictionaryService.getAllProperties(null))
        {
            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 propertyDefinition;
    }
    if (match == null)
    {
        return null;
    }
    else
    {
        return dictionaryService.getProperty(match);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:40,代码来源:QueryParserUtils.java

示例4: resolveInheritance

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public void resolveInheritance(CMISMapping cmisMapping,
        CMISDictionaryRegistry registry, DictionaryService dictionaryService)
{
    PropertyDefinition<?> propertyDefintion;

    if (parent != null)
    {
        for (PropertyDefinitionWrapper propDef : parent.getProperties(false))
        {
            if (propertiesById.containsKey(propDef.getPropertyId()))
            {
                continue;
            }

            org.alfresco.service.cmr.dictionary.PropertyDefinition alfrescoPropDef = dictionaryService.getProperty(
                    propDef.getOwningType().getAlfrescoName(), propDef.getAlfrescoName());

            propertyDefintion = createPropertyDefinition(cmisMapping, propDef.getPropertyId(),
                    alfrescoPropDef.getName(), dictionaryService, alfrescoPropDef, true);

            if (propertyDefintion != null)
            {
                registerProperty(new BasePropertyDefintionWrapper(propertyDefintion, alfrescoPropDef.getName(),
                        propDef.getOwningType(), propDef.getPropertyAccessor(), propDef.getPropertyLuceneBuilder()));
            }
        }
    }

    List<TypeDefinitionWrapper> children = registry.getChildren(typeDef.getId());
    for (TypeDefinitionWrapper child : children)
    {
        if (child instanceof AbstractTypeDefinitionWrapper)
        {
            ((AbstractTypeDefinitionWrapper) child).resolveInheritance(cmisMapping, registry,
                    dictionaryService);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:39,代码来源:ShadowTypeDefinitionWrapper.java

示例5: resolveInheritance

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public void resolveInheritance(CMISMapping cmisMapping, CMISDictionaryRegistry registry,
        DictionaryService dictionaryService)
{
    PropertyDefinition<?> propertyDefintion;

    if (parent != null)
    {
        for (PropertyDefinitionWrapper propDef : parent.getProperties(false))
        {
            org.alfresco.service.cmr.dictionary.PropertyDefinition alfrescoPropDef = dictionaryService.getProperty(
                    propDef.getOwningType().getAlfrescoName(), propDef.getAlfrescoName());

            propertyDefintion = createPropertyDefinition(cmisMapping, propDef.getPropertyId(),
                    alfrescoPropDef.getName(), dictionaryService, alfrescoPropDef, true);

            if (propertyDefintion != null)
            {
                registerProperty(new BasePropertyDefintionWrapper(propertyDefintion, alfrescoPropDef.getName(),
                        propDef.getOwningType(), propDef.getPropertyAccessor(), propDef.getPropertyLuceneBuilder()));
            }
        }
    }

    List<TypeDefinitionWrapper> children = registry.getChildren(typeDef.getId());
    for (TypeDefinitionWrapper child : children)
    {
        if (child instanceof AbstractTypeDefinitionWrapper)
        {
            ((AbstractTypeDefinitionWrapper) child).resolveInheritance(cmisMapping, registry, dictionaryService);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:33,代码来源:RelationshipTypeDefintionWrapper.java

示例6: createParameterDefinition

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static QueryParameterDefinition createParameterDefinition(Element element, DictionaryService dictionaryService,  NamespacePrefixResolver nspr)
{

    if (element.getQName().getName().equals(ELEMENT_QNAME.getName()))
    {
        QName qName = null;
        Element qNameElement = element.element(DEF_QNAME.getName());
        if (qNameElement != null)
        {
            qName = QName.createQName(qNameElement.getText(), nspr);
        }

        PropertyDefinition propDef = null;
        Element propDefElement = element.element(PROPERTY_QNAME.getName());
        if (propDefElement != null)
        {
            propDef = dictionaryService.getProperty(QName.createQName(propDefElement.getText(), nspr));
        }

        DataTypeDefinition typeDef = null;
        Element typeDefElement = element.element(PROPERTY_TYPE_QNAME.getName());
        if (typeDefElement != null)
        {
            typeDef = dictionaryService.getDataType(QName.createQName(typeDefElement.getText(), nspr));
        }

        boolean hasDefault = false;
        String defaultValue = null;
        Element defaultValueElement = element.element(DEFAULT_VALUE.getName());
        if(defaultValueElement != null)
        {
            hasDefault = true;
            defaultValue = defaultValueElement.getText();
        }
        
        if (propDef != null)
        {
            return new QueryParameterDefImpl(qName, propDef, hasDefault, defaultValue);
        }
        else
        {
            return new QueryParameterDefImpl(qName, typeDef, hasDefault, defaultValue);
        }
    }
    else
    {
        return null;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:50,代码来源:QueryParameterDefImpl.java


注:本文中的org.alfresco.service.cmr.dictionary.DictionaryService.getProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。