本文整理匯總了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);
}
}
}
示例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
}
}
}
}
}
示例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());
}
示例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);
}
}
}
示例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;
}
示例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
}