本文整理汇总了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);
}
示例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);
}
示例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;
}
示例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));
}