public void addAttribute(AttributesImpl attrs, QName name, int value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "int", Integer.toString(value)); }
public void startAssocs(NodeRef nodeRef) { try { contentHandler.startElement(ASSOCIATIONS_QNAME.getNamespaceURI(), ASSOCIATIONS_LOCALNAME, toPrefixString(ASSOCIATIONS_QNAME), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start associations", e); } }
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); } }
public void endReference(NodeRef nodeRef) { try { contentHandler.endElement(REFERENCE_QNAME.getNamespaceURI(), REFERENCE_LOCALNAME, toPrefixString(REFERENCE_QNAME)); } catch (SAXException e) { throw new ExporterException("Failed to process end reference", e); } }
public void endAspects(NodeRef nodeRef) { try { contentHandler.endElement(ASPECTS_QNAME.getNamespaceURI(), ASPECTS_LOCALNAME, toPrefixString(ASPECTS_QNAME)); } catch (SAXException e) { throw new ExporterException("Failed to process end aspects", e); } }
public void addAttribute(AttributesImpl attrs, QName name, String value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "String", value); }
public void startAspects(NodeRef nodeRef) { try { contentHandler.startElement(ASPECTS_QNAME.getNamespaceURI(), ASPECTS_LOCALNAME, toPrefixString(ASPECTS_QNAME), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start aspects", e); } }
@Override public QName getBaseName(QName name, boolean forceForNonTenant) { String baseNamespaceURI = getBaseName(name.getNamespaceURI(), forceForNonTenant); return QName.createQName(baseNamespaceURI, name.getLocalName()); }
@Override public ConstraintDefinition getCustomConstraint(QName name) { ParameterCheck.mandatory("name", name); CompiledModel compiledModel = getModelByUri(name.getNamespaceURI()); if (compiledModel != null) { return compiledModel.getConstraint(name); } return null; }
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 TypeDefinition getCustomType(QName name) { ParameterCheck.mandatory("name", name); CompiledModel compiledModel = getModelByUri(name.getNamespaceURI()); if (compiledModel != null) { return compiledModel.getType(name); } return null; }
public void endACL(NodeRef nodeRef) { try { contentHandler.endElement(ACL_QNAME.getNamespaceURI(), ACL_QNAME.getLocalName(), toPrefixString(ACL_QNAME)); } catch (SAXException e) { throw new ExporterException("Failed to process end ACL event - node ref " + nodeRef.toString()); } }
public void endProperty(NodeRef nodeRef, QName property) { try { QName encodedProperty = QName.createQName(property.getNamespaceURI(), ISO9075.encode(property.getLocalName())); contentHandler.endElement(encodedProperty.getNamespaceURI(), encodedProperty.getLocalName(), toPrefixString(encodedProperty)); } catch (SAXException e) { throw new ExporterException("Failed to process end property event - nodeRef " + nodeRef + "; property " + toPrefixString(property), e); } }
public void startAssoc(NodeRef nodeRef, QName assoc) { try { contentHandler.startElement(assoc.getNamespaceURI(), assoc.getLocalName(), toPrefixString(assoc), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start assoc event - nodeRef " + nodeRef + "; association " + toPrefixString(assoc), e); } }
public void startProperty(NodeRef nodeRef, QName property) { try { QName encodedProperty = QName.createQName(property.getNamespaceURI(), ISO9075.encode(property.getLocalName())); contentHandler.startElement(encodedProperty.getNamespaceURI(), encodedProperty.getLocalName(), toPrefixString(encodedProperty), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start property event - nodeRef " + nodeRef + "; property " + toPrefixString(property), e); } }
public void endElement(QName name) { try { dom4jWriter.endElement(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver)); } catch (SAXException e) { //Can't happen } }
public void endNode(NodeRef nodeRef) { try { QName type = nodeService.getType(nodeRef); contentHandler.endElement(type.getNamespaceURI(), type.getLocalName(), toPrefixString(type)); } catch (SAXException e) { throw new ExporterException("Failed to process end node event - node ref " + nodeRef.toString(), e); } }
public void endAspect(NodeRef nodeRef, QName aspect) { try { contentHandler.endElement(aspect.getNamespaceURI(), aspect.getLocalName(), toPrefixString(aspect)); } catch (SAXException e) { throw new ExporterException("Failed to process end aspect event - node ref " + nodeRef.toString() + "; aspect " + toPrefixString(aspect), e); } }
public void startAspect(NodeRef nodeRef, QName aspect) { try { contentHandler.startElement(aspect.getNamespaceURI(), aspect.getLocalName(), toPrefixString(aspect), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start aspect event - node ref " + nodeRef.toString() + "; aspect " + toPrefixString(aspect), e); } }
public Pair<Long, QName> createValue(QName qname) { String uri = qname.getNamespaceURI(); String localName = qname.getLocalName(); // Create namespace Pair<Long, String> namespaceEntity = getOrCreateNamespace(uri); Long nsId = namespaceEntity.getFirst(); // Create QName QNameEntity entity = createQNameEntity(nsId, localName); return new Pair<Long, QName>(entity.getId(), qname); }