當前位置: 首頁>>代碼示例>>Java>>正文


Java QName.resolveToQName方法代碼示例

本文整理匯總了Java中org.alfresco.service.namespace.QName.resolveToQName方法的典型用法代碼示例。如果您正苦於以下問題:Java QName.resolveToQName方法的具體用法?Java QName.resolveToQName怎麽用?Java QName.resolveToQName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.alfresco.service.namespace.QName的用法示例。


在下文中一共展示了QName.resolveToQName方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: afterPropertiesSet

import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public void afterPropertiesSet() throws Exception
{
    if (permissionService == null)
    {
        throw new IllegalArgumentException("There must be a permission service");
    }
    if (nspr == null)
    {
        throw new IllegalArgumentException("There must be a namespace service");
    }
    if (nodeService == null)
    {
        throw new IllegalArgumentException("There must be a node service");
    }
    if(unfilteredFor != null)
    {
        for(String qnameString : unfilteredFor)
        {
            QName qname = QName.resolveToQName(nspr, qnameString);
            unfilteredForClassQNames.add(qname);
        }
    }
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:24,代碼來源:ACLEntryAfterInvocationProvider.java

示例2: initIgnoringPathsByCriterion

import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
protected void initIgnoringPathsByCriterion(List<String> initDataInString, Set<QName> dataForIgnoringPaths, DefinitionExistChecker dec)
{
    if (null != initDataInString)
    {
        for (String qNameInString : initDataInString)
        {
            if ((null != qNameInString) && !qNameInString.isEmpty())
            {
                try
                {
                    QName qname = QName.resolveToQName(namespaceService, qNameInString);
                    if (dec.isDefinitionExists(qname))
                    {
                        dataForIgnoringPaths.add(qname);
                    }
                }
                catch (InvalidQNameException e)
                {
                    // Just ignore
                }
            }
        }
    }
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:25,代碼來源:AbstractIndexFilter.java

示例3: getRenditionByName

import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
protected NodeRef getRenditionByName(NodeRef nodeRef, String renditionId, Parameters parameters)
{
    if (nodeRef == null)
    {
        return null;
    }

    if (StringUtils.isEmpty(renditionId))
    {
        throw new InvalidArgumentException("renditionId can't be null or empty.");
    }
    // Thumbnails have a cm: prefix.
    QName renditionQName = QName.resolveToQName(namespaceService, renditionId);

    ChildAssociationRef nodeRefRendition = renditionService.getRenditionByName(nodeRef, renditionQName);
    if (nodeRefRendition == null)
    {
        return null;
    }

    return tenantService.getName(nodeRef, nodeRefRendition.getChildRef());
}
 
開發者ID:Alfresco,項目名稱:alfresco-remote-api,代碼行數:23,代碼來源:RenditionsImpl.java

示例4: afterPropertiesSet

import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
public void afterPropertiesSet() throws Exception
{
    if (permissionService == null)
    {
        throw new IllegalArgumentException("There must be a permission service");
    }
    if (nspr == null)
    {
        throw new IllegalArgumentException("There must be a namespace service");
    }
    if (nodeService == null)
    {
        throw new IllegalArgumentException("There must be a node service");
    }
    if (authorityService == null)
    {
        throw new IllegalArgumentException("There must be an authority service");
    }
    if(abstainFor != null)
    {
        for(String qnameString : abstainFor)
        {
            QName qname = QName.resolveToQName(nspr, qnameString);
            abstainForClassQNames.add(qname);
        }
    }

}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:29,代碼來源:ACLEntryVoter.java

示例5: get

import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
@Override
public Object get(Object name)
{
    Object value = super.get(name);
    
    if (value == null)
    {
       // convert the key to a qname and look up the data-type for the property
       QName qname = QName.resolveToQName(getResolver(), name.toString());
       PropertyDefinition propDef = this.services.getDictionaryService().getProperty(qname);
       if (propDef != null && DataTypeDefinition.CONTENT.equals(propDef.getDataType().getName()))
       {
           // found a valid cm:content property that is not initialised
           String mimetype = null;
           if (qname.equals(ContentModel.PROP_CONTENT)) 
           {
               String fileName = (String)get("cm:name");
               if (fileName != null)
               {
                   // We don't have any content, so just use the filename when
                   //  trying to guess the mimetype for this
                   mimetype = this.services.getMimetypeService().guessMimetype(fileName);
               }
           }
           ContentData cdata = new ContentData(null, mimetype, 0L, "UTF-8");
           // create the JavaScript API object we need
           value = factory.new ScriptContentData(cdata, qname);
           // and store it so it is available to the API user
           put(name, value);
       }
    }
    
    return value;
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:35,代碼來源:ContentAwareScriptableQNameMap.java

示例6: startElement

import org.alfresco.service.namespace.QName; //導入方法依賴的package包/類
/**
 * Start Element
 */
public void startElement(String uri, String localName, String prefixName, Attributes atts)
throws SAXException
{
    QName elementQName = QName.resolveToQName(this, prefixName);
    
    HashMap<String, String> namespace = new HashMap<String, String>();
    namespaces.addFirst(namespace);
            
    /**
     * Look for any namespace attributes
     */
    for(int i = 0; i < atts.getLength(); i++)
    {
        QName attributeQName = QName.resolveToQName(this, atts.getQName(i));
        if(attributeQName.getNamespaceURI().equals(XMLNS_URI))
        {
            namespace.put(attributeQName.getLocalName(), atts.getValue(i));
        }
    }
    
    if(elementQName == null)
    {
        return;
    }
    
    if(elementQName.getNamespaceURI().equals(REQUSITE_URI));
    {
        // This is one of the transfer manifest elements
        String elementName = elementQName.getLocalName();
        
        // Simple and stupid parser for now
        if(elementName.equals(RequsiteModel.LOCALNAME_TRANSFER_REQUSITE))
        {
            // Good we got this
        }
        else if(elementName.equals(RequsiteModel.LOCALNAME_ELEMENT_CONTENT))
        {
            NodeRef nodeRef = new NodeRef(atts.getValue("", "nodeRef"));
            QName qname = QName.createQName(atts.getValue("", "qname"));
            String name = atts.getValue("", "name");
            
            processor.missingContent(nodeRef, qname, name);
        }
    } // if transfer URI       
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:49,代碼來源:XMLTransferRequsiteReader.java


注:本文中的org.alfresco.service.namespace.QName.resolveToQName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。