public DefaultNamePathResolver(Session session) { this(new SessionNamespaceResolver(session), ((session instanceof IdentifierResolver)? (IdentifierResolver) session : null), false); }
public DefaultNamePathResolver(Session session) { this(new SessionNamespaceResolver(session), ((session instanceof IdentifierResolver)? (IdentifierResolver) session : null), false); }
/** * Creates a new nodetype writer based on a session * * @param out the underlying writer * @param s repository session * @param includeNS if <code>true</code> all used namespace declarations * are also written to the writer */ public CompactNodeTypeDefWriter(Writer out, Session s, boolean includeNS) { this(out, new SessionNamespaceResolver(s), new DefaultNamePathResolver(s), includeNS); }
/** * Creates a new nodetype writer based on a session * * @param out the underlying writer * @param s repository session * @param includeNS if <code>true</code> all used namespace declarations * are also written to the writer */ public CompactNodeTypeDefWriter(Writer out, Session s, boolean includeNS) { this(out, new SessionNamespaceResolver(s), new DefaultNamePathResolver(s), includeNS); }
/** * Create the facet rule based on the rule * @param node * @throws RepositoryException */ public QFacetRule(final Node node) throws RepositoryException { // get mandatory properties facet = node.getProperty(HippoNodeType.HIPPO_FACET).getString(); // Set the JCR Name for the facet (string) facetName = NameParser.parse(facet, new SessionNamespaceResolver(node.getSession()), NameFactoryImpl.getInstance()); equals = node.getProperty(HippoNodeType.HIPPO_EQUALS).getBoolean(); optional = node.getProperty(HippoNodeType.HIPPOSYS_FILTER).getBoolean(); int tmpType = PropertyType.valueFromName(node.getProperty(HippoNodeType.HIPPOSYS_TYPE).getString()); String tmpValue = node.getProperty(HippoNodeType.HIPPOSYS_VALUE).getString(); //NameResolver nRes = new ParsingNameResolver(NameFactoryImpl.getInstance(), new SessionNamespaceResolver(node.getSession())); // if it's a name property set valueName Name tmpName = null; if (tmpType == PropertyType.NAME && !tmpValue.equals(FacetAuthConstants.WILDCARD)) { tmpName = NameParser.parse(tmpValue, new SessionNamespaceResolver(node.getSession()), NameFactoryImpl.getInstance()); } else if (tmpType == PropertyType.REFERENCE) { // convert to a String matcher on UUID tmpType = PropertyType.STRING; tmpValue = parseReferenceTypeValue(node); } // set final values type = tmpType; value = tmpValue; valueName = tmpName; }
NamePathResolver resolver = new DefaultNamePathResolver(new SessionNamespaceResolver(session));
startNode = node; session = node.getSession(); nsResolver = new SessionNamespaceResolver(session);
protected DocViewSAXFormatter(Aggregate aggregate, ContentHandler contentHandler) throws RepositoryException { this.aggregate = aggregate; this.session = aggregate.getNode().getSession(); nsResolver = new SessionNamespaceResolver(session); this.contentHandler = contentHandler; DefaultNamePathResolver npResolver = new DefaultNamePathResolver(nsResolver); // resolve the names of some well known properties // allowing for session-local prefix mappings try { jcrPrimaryType = npResolver.getJCRName(NameConstants.JCR_PRIMARYTYPE); jcrMixinTypes = npResolver.getJCRName(NameConstants.JCR_MIXINTYPES); jcrUUID = npResolver.getJCRName(NameConstants.JCR_UUID); jcrRoot = npResolver.getJCRName(NameConstants.JCR_ROOT); ntUnstructured = npResolver.getJCRName(NameConstants.NT_UNSTRUCTURED); } catch (NamespaceException e) { // should never get here... String msg = "internal error: failed to resolve namespace mappings"; throw new RepositoryException(msg, e); } useBinaryReferences = "true".equals(aggregate.getManager().getConfig().getProperty(VaultFsConfig.NAME_USE_BINARY_REFERENCES)); }
TxInfo root = prepare(archive.getJcrRoot(), parentPath, new SessionNamespaceResolver(session)); if (filter!=null && filter.getFilterSets() != null && filter.getFilterSets().size() > 0 ) { root = postFilter(root);