Package org.alfresco.service.namespace

Examples of org.alfresco.service.namespace.NamespaceService


  }

  @SuppressWarnings("unchecked")
  private String getPathFromSpaceRef(NodeRef ref, boolean children) {
    Path path = serviceRegistry.getNodeService().getPath(ref);
    NamespaceService ns = serviceRegistry.getNamespaceService();
    StringBuilder buf = new StringBuilder(64);
    for (int i = 0; i < path.size(); i++) {
      String elementString = "";
      Path.Element element = path.get(i);
      if (element instanceof Path.ChildAssocElement) {
        ChildAssociationRef elementRef = ((Path.ChildAssocElement) element).getRef();
        if (elementRef.getParentRef() != null) {
          Collection prefixes = ns.getPrefixes(elementRef.getQName().getNamespaceURI());
          if (prefixes.size() > 0) {
            elementString = '/' + (String) prefixes.iterator().next() + ':'
                + ISO9075.encode(elementRef.getQName().getLocalName());
          }
        }
View Full Code Here


  }

  @SuppressWarnings("unchecked")
  private String getPathFromSpaceRef(NodeRef ref, boolean children) {
    Path path = serviceRegistry.getNodeService().getPath(ref);
    NamespaceService ns = serviceRegistry.getNamespaceService();
    StringBuilder buf = new StringBuilder(64);
    for (int i = 0; i < path.size(); i++) {
      String elementString = "";
      Path.Element element = path.get(i);
      if (element instanceof Path.ChildAssocElement) {
        ChildAssociationRef elementRef = ((Path.ChildAssocElement) element).getRef();
        if (elementRef.getParentRef() != null) {
          Collection prefixes = ns.getPrefixes(elementRef.getQName().getNamespaceURI());
          if (prefixes.size() > 0) {
            elementString = '/' + (String) prefixes.iterator().next() + ':'
                + ISO9075.encode(elementRef.getQName().getLocalName());
          }
        }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  private String getPathFromSpaceRef(NodeRef ref, boolean children) {
    Path path = serviceRegistry.getNodeService().getPath(ref);
    NamespaceService ns = serviceRegistry.getNamespaceService();
    StringBuilder buf = new StringBuilder(64);
    for (int i = 0; i < path.size(); i++) {
      String elementString = "";
      Path.Element element = path.get(i);
      if (element instanceof Path.ChildAssocElement) {
        ChildAssociationRef elementRef = ((Path.ChildAssocElement) element).getRef();
        if (elementRef.getParentRef() != null) {
          Collection prefixes = ns.getPrefixes(elementRef.getQName().getNamespaceURI());
          if (prefixes.size() > 0) {
            elementString = '/' + (String) prefixes.iterator().next() + ':'
                + ISO9075.encode(elementRef.getQName().getLocalName());
          }
        }
View Full Code Here

TOP

Related Classes of org.alfresco.service.namespace.NamespaceService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.