public String getAttributeQName(Object o) { QName qName = ((Property) o).qname; String escapedLocalName = ISO9075.encode(qName.getLocalName()); if (EqualsHelper.nullSafeEquals(escapedLocalName, qName.getLocalName())) { return qName.toString(); } else { return QName.createQName(qName.getNamespaceURI(), escapedLocalName).toString(); } }
public boolean isExcludedClass(QName className) { for (QName excludedClass : excludedClasses) { if (excludedClass.equals(className)) { return true; } } return false; }
public ChildAssociationRef getCategory(NodeRef parent, QName aspectName, String name) { String uri = nodeService.getPrimaryParent(parent).getQName().getNamespaceURI(); String validLocalName = QName.createValidLocalName(name); Collection<ChildAssociationRef> assocs = nodeService.getChildAssocs(parent, ContentModel.ASSOC_SUBCATEGORIES, QName.createQName(uri, validLocalName), false); if (assocs.isEmpty()) { return null; } return assocs.iterator().next(); }
public void addAttribute(AttributesImpl attrs, QName name, String value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "String", value); }
@Override public QName getBaseName(QName name, boolean forceForNonTenant) { String baseNamespaceURI = getBaseName(name.getNamespaceURI(), forceForNonTenant); return QName.createQName(baseNamespaceURI, name.getLocalName()); }
/** * Constructor */ public AspectMissingException(QName missingAspect, NodeRef nodeRef) { super(MessageFormat.format(ERROR_MESSAGE, new Object[]{missingAspect.toString(), nodeRef.getId()})); this.missingAspect = missingAspect; this.nodeRef = nodeRef; }
protected ChildAssociationRef createTypedNode(NodeRef parent, final String name, QName type, HashMap<QName, Serializable> properties) { final HashMap<QName, Serializable> newProperties = new HashMap<QName, Serializable>(properties); newProperties.put(ContentModel.PROP_NAME, name); QName assocQName = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName.createValidLocalName(name)); return nodeService.createNode(parent, ContentModel.ASSOC_CONTAINS, assocQName, type, newProperties); }
/** * @deprecated Uses search and does not report on ephemeral locks. */ @Deprecated public List<NodeRef> getLocks(StoreRef storeRef) { return getLocks( storeRef, "ASPECT:\"" + ContentModel.ASPECT_LOCKABLE.toString() + "\" +@\\{http\\://www.alfresco.org/model/content/1.0\\}" + ContentModel.PROP_LOCK_OWNER.getLocalName() + ":\"" + getUserName() + "\""); }
changedFileName); QName filingDataAssocQName = filingData.getAssocQName(); changedAssocQName = QName.createQName(filingDataAssocQName.getNamespaceURI(), QName.createValidLocalName(changedFileName)); parentReference); QName vChildAssocQName = QName .createQNameWithValidLocalName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI, actualChildAssocRef.getQName().getLocalName()); ChildAssociationRef childAssocRef = new ChildAssociationRef(actualChildAssocRef.getTypeQName(), parentRef,
public void endAssoc(NodeRef nodeRef, QName assoc) { try { contentHandler.endElement(assoc.getNamespaceURI(), assoc.getLocalName(), toPrefixString(assoc)); } catch (SAXException e) { throw new ExporterException("Failed to process end assoc event - nodeRef " + nodeRef + "; association " + toPrefixString(assoc), e); } }
@Override public void afterPropertiesSet() throws Exception { lock = QName.createQName(NamespaceService.SYSTEM_MODEL_1_0_URI, "SolrBackupClient-"+core); } }
QName safeQName = QName.createQNameWithValidLocalName(NamespaceService.CONTENT_MODEL_1_0_URI, workingName);
pv2 = node2.getProperties().get(sortPropQName); if (sortPropQName.getLocalName().equals(IS_FOLDER)) result = (((QName) pv1).compareTo((QName) pv2));
if (sortPropQName.equals(GetChildrenCannedQuery.SORT_QNAME_CONTENT_SIZE) || sortPropQName.equals(GetChildrenCannedQuery.SORT_QNAME_CONTENT_MIMETYPE)) if (cd != null) if (sortPropQName.equals(GetChildrenCannedQuery.SORT_QNAME_CONTENT_SIZE)) else if (sortPropQName.equals(GetChildrenCannedQuery.SORT_QNAME_CONTENT_MIMETYPE)) else if (sortPropQName.equals(GetChildrenCannedQuery.SORT_QNAME_NODE_TYPE)) else if (sortPropQName.equals(GetChildrenCannedQuery.SORT_QNAME_NODE_IS_FOLDER)) result = ((QName)val).compareTo((QName)prevVal);
parent); assertNotNull(firstAssoc.getQName()); assertEquals(QName.createQNameWithValidLocalName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI, "Node2"), firstAssoc.getQName()); parent); assertNotNull(firstAssoc.getQName()); assertEquals(QName.createQName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI, "Node2"), firstAssoc.getQName());
private DataType getPropertyType(QName propertyName) { DataType dataType = null; PropertyDefinition def = dictionaryService.getProperty(propertyName); if(def != null) { DataTypeDefinition dataTypeDef = def.getDataType(); String dataTypeDefStr = dataTypeDef.getName().getPrefixString().substring(2); StringBuilder dataTypeName = new StringBuilder(dataTypeDefStr.substring(0, 1).toUpperCase()); dataTypeName.append(dataTypeDefStr.substring(1)); dataType = DataType.valueOf(dataTypeName.toString()); } return dataType; }
private void setUpTestAssociations(NodeRef actualNodeRef) rootChildrenQNames[0] = QName.createQNameWithValidLocalName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI, "Node2"); rootChildrenQNames[1] = QName.createQNameWithValidLocalName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI, "Node1"); node2ChildNameString); node2Test1_2_TXTNodeRef = node2ChildAssoc.getChildRef(); rootChildrenQNames[2] = QName.createQNameWithValidLocalName(NamespaceService.CONTENT_MODEL_1_0_URI, node2ChildNameString); node2ChildrenQNames[0] = QName.createQNameWithValidLocalName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI, "Node2_1"); node2ChildrenQNames[1] = node2ChildAssoc.getQName(); rootChildrenQNames[2 + i] = QName.createQNameWithValidLocalName(NamespaceService.CONTENT_MODEL_1_0_URI, childAssoc.getQName().getLocalName()); node2_1ChildrenQNames[i - 1] = childAssoc.getQName();
String taggable = ContentModel.ASPECT_TAGGABLE.getPrefixedQName(namespaceService).toPrefixString(); PropertyData<?> propData = cmisProps.get(taggable); assertNotNull(propData);
result = (((QName)pv1).compareTo((QName)pv2));
public void endAssocs(NodeRef nodeRef) { try { contentHandler.endElement(ASSOCIATIONS_QNAME.getNamespaceURI(), ASSOCIATIONS_LOCALNAME, toPrefixString(ASSOCIATIONS_QNAME)); } catch (SAXException e) { throw new ExporterException("Failed to process end associations", e); } }