当前位置: 首页>>代码示例>>Java>>正文


Java Path.toString方法代码示例

本文整理汇总了Java中org.alfresco.service.cmr.repository.Path.toString方法的典型用法代码示例。如果您正苦于以下问题:Java Path.toString方法的具体用法?Java Path.toString怎么用?Java Path.toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.alfresco.service.cmr.repository.Path的用法示例。


在下文中一共展示了Path.toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writePrimaryParent

import org.alfresco.service.cmr.repository.Path; //导入方法依赖的package包/类
private void writePrimaryParent(ChildAssociationRef parentAssoc, Path parentPath)
            throws SAXException
{
    writer.startElement(TransferModel.TRANSFER_MODEL_1_0_URI,
                ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PARENT, PREFIX + ":"
                            + ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PARENT, EMPTY_ATTRIBUTES);

    writeParentAssoc(parentAssoc);

    writer.startElement(TransferModel.TRANSFER_MODEL_1_0_URI,
                ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PATH, PREFIX + ":"
                            + ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PATH, EMPTY_ATTRIBUTES);
    if (parentPath != null)
    {
        String path = parentPath.toString();
        writer.characters(path.toCharArray(), 0, path.length());
    }
    writer.endElement(TransferModel.TRANSFER_MODEL_1_0_URI,
                ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PATH, PREFIX + ":"
                            + ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PATH);

    writer.endElement(TransferModel.TRANSFER_MODEL_1_0_URI,
                ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PARENT, PREFIX + ":"
                            + ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PARENT);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:XMLTransferManifestWriter.java

示例2: writePrimaryParent

import org.alfresco.service.cmr.repository.Path; //导入方法依赖的package包/类
private void writePrimaryParent(ChildAssociationRef parentAssoc, Path parentPath) throws SAXException
{   
    writer.startElement(TransferReportModel2.TRANSFER_REPORT_MODEL_2_0_URI, TransferReportModel.LOCALNAME_TRANSFER_PRIMARY_PARENT, PREFIX + ":" + TransferReportModel.LOCALNAME_TRANSFER_PRIMARY_PARENT,  EMPTY_ATTRIBUTES);

    writeParentAssoc(parentAssoc);
    
    writer.startElement(TransferReportModel2.TRANSFER_REPORT_MODEL_2_0_URI, TransferReportModel.LOCALNAME_TRANSFER_PRIMARY_PATH, PREFIX + ":" + TransferReportModel.LOCALNAME_TRANSFER_PRIMARY_PATH,  EMPTY_ATTRIBUTES);
    if(parentPath != null)
    {  
        String path = parentPath.toString();
        writer.characters(path.toCharArray(), 0, path.length()); 
    }
    writer.endElement(TransferReportModel2.TRANSFER_REPORT_MODEL_2_0_URI, TransferReportModel.LOCALNAME_TRANSFER_PRIMARY_PATH, PREFIX + ":" + ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PATH); 

    writer.endElement(TransferReportModel2.TRANSFER_REPORT_MODEL_2_0_URI, TransferReportModel.LOCALNAME_TRANSFER_PRIMARY_PARENT, PREFIX + ":" + ManifestModel.LOCALNAME_ELEMENT_PRIMARY_PARENT); 
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:XMLTransferReportWriter.java

示例3: regenerateDocumentPath

import org.alfresco.service.cmr.repository.Path; //导入方法依赖的package包/类
private Document regenerateDocumentPath(Pair<Boolean, Path> pathPair)
{
    Path path = pathPair.getSecond();
    NodeRef nodeRef = tenantService.getName(((ChildAssocElement) path.last()).getRef().getChildRef());
    String pathString = path.toString();
    if ((pathString.length() > 0) && (pathString.charAt(0) == '/'))
    {
        pathString = pathString.substring(1);
    }
    Document directoryEntry = new Document();
    directoryEntry.add(new Field("ID", nodeRef.toString(), Field.Store.YES, Field.Index.NO_NORMS,
            Field.TermVector.NO));
    directoryEntry.add(new Field("PATH", pathString, Field.Store.YES, Field.Index.TOKENIZED,
            Field.TermVector.NO));
    for (NodeRef parent : getParents(path))
    {
        directoryEntry.add(new Field("ANCESTOR", tenantService.getName(parent).toString(),
                Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
    }
    directoryEntry.add(new Field("ISCONTAINER", "T", Field.Store.YES, Field.Index.NO_NORMS,
            Field.TermVector.NO));

    if (pathPair.getFirst())
    {
        directoryEntry.add(new Field("ISCATEGORY", "T", Field.Store.YES, Field.Index.NO_NORMS,
                Field.TermVector.NO));
    }
    return directoryEntry;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:ADMLuceneIndexerImpl.java

示例4: Node

import org.alfresco.service.cmr.repository.Path; //导入方法依赖的package包/类
public Node(NodeRef nodeRef)
{
    this.nodeRef = nodeRef;
    Path path = getNodeService().getPath(nodeRef);
    this.qnamePath = path.toString();
    this.prefixedQNamePath = path.toPrefixString(getNamespaceService());
    this.parentNodeRef = getPrimaryParent(nodeRef);
    ChildAssociationRef ref = getNodeService().getPrimaryParent(nodeRef);
    this.childAssoc = ref.getQName() != null ? new QNameBean(ref.getQName()) : null;
    this.type = new QNameBean(getNodeService().getType(nodeRef));
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:12,代码来源:NodeBrowserPost.java


注:本文中的org.alfresco.service.cmr.repository.Path.toString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。