public Element toXml(Document document) { return NodeTypeUtil.ntNameToXml(ntName, document); } });
public static Collection<String> ntNamesFromXml(Object propValue) { // assume property has be built from xml if (propValue instanceof List) { return retrieveNodeTypeNames(((List<?>)propValue)); } else if (propValue instanceof Element) { List<Element> l = Collections.singletonList((Element) propValue); return retrieveNodeTypeNames(l); } else { // Property value cannot be parsed into node type names. return Collections.emptySet(); } }
/** * Create a new <code>NodeTypeProperty</code> from the specified general * DavProperty object. * * @param property */ public NodeTypeProperty(DavProperty<?> property) { super(property.getName(), property.isInvisibleInAllprop()); if (property instanceof NodeTypeProperty) { nodetypeNames.addAll(((NodeTypeProperty) property).nodetypeNames); } else { nodetypeNames.addAll(NodeTypeUtil.ntNamesFromXml(property.getValue())); } }
DavProperty<?> prop = propSet.get(JcrRemotingConstants.JCR_PRIMARYNODETYPE_LN, ItemResourceConstants.NAMESPACE); if (prop != null) { Iterator<String> it = NodeTypeUtil.ntNamesFromXml(prop.getValue()).iterator(); if (it.hasNext()) { String jcrName = it.next(); Collection<String> mixinNames = NodeTypeUtil.ntNamesFromXml(prop.getValue()); mixinNodeTypeNames = new Name[mixinNames.size()]; int i = 0;
public static Collection<String> ntNamesFromXml(Object propValue) { // assume property has be built from xml if (propValue instanceof List) { return retrieveNodeTypeNames(((List<?>)propValue)); } else if (propValue instanceof Element) { List<Element> l = Collections.singletonList((Element) propValue); return retrieveNodeTypeNames(l); } else { // Property value cannot be parsed into node type names. return Collections.emptySet(); } }
public Element toXml(Document document) { return NodeTypeUtil.ntNameToXml(ntName, document); } });
DavProperty<?> prop = propSet.get(JcrRemotingConstants.JCR_PRIMARYNODETYPE_LN, ItemResourceConstants.NAMESPACE); if (prop != null) { Iterator<String> it = NodeTypeUtil.ntNamesFromXml(prop.getValue()).iterator(); if (it.hasNext()) { String jcrName = it.next(); Collection<String> mixinNames = NodeTypeUtil.ntNamesFromXml(prop.getValue()); mixinNodeTypeNames = new Name[mixinNames.size()]; int i = 0;
public static Collection<String> ntNamesFromXml(Object propValue) { // assume property has be built from xml if (propValue instanceof List) { return retrieveNodeTypeNames(((List<?>)propValue)); } else if (propValue instanceof Element) { List<Element> l = Collections.singletonList((Element) propValue); return retrieveNodeTypeNames(l); } else { // Property value cannot be parsed into node type names. return Collections.emptySet(); } }
/** * @see org.apache.jackrabbit.webdav.xml.XmlSerializable#toXml(Document) */ @Override public Element toXml(Document document) { Element elem = getName().toXml(document); for (String name : getNodeTypeNames()) { elem.appendChild(NodeTypeUtil.ntNameToXml(name, document)); } return elem; } }