Mark Rogers ec8137e8dc Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
77259: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      76447: SOLR node metadata includes getNamePaths, which is a Collection<Collection<String>>
       - JSON serialization stubbed out; fix TODOs in NodesMetaDataGet to transfer serialize to specification
       - The name paths are the largest list of names of nodes that culminate in the target node.
       - The top parent is the last highest parent with a cm:name property
       - ALL paths are introspected but it does not mean that the node path count will always equal the name path count


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2014-07-23 16:56:36 +00:00

178 lines
4.3 KiB
Java

/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.solr;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.Path;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
/**
*
* @since 4.0
*/
public class NodeMetaData
{
private Long nodeId;
private NodeRef nodeRef;
private String owner;
private QName nodeType;
private Long aclId;
private Map<QName, Serializable> properties;
private Set<QName> aspects;
private Collection<Pair<Path, QName>> paths;
private Collection<Collection<String>> namePaths;
private List<ChildAssociationRef> childAssocs;
private List<ChildAssociationRef> parentAssocs;
private Long parentAssocsCrc;
private List<Long> childIds;
private Long txnId;
private String tenantDomain;
public String getOwner()
{
return owner;
}
public void setOwner(String owner)
{
this.owner = owner;
}
public NodeRef getNodeRef()
{
return nodeRef;
}
public void setNodeRef(NodeRef nodeRef)
{
this.nodeRef = nodeRef;
}
public Collection<Pair<Path, QName>> getPaths()
{
return paths;
}
public void setPaths(Collection<Pair<Path, QName>> paths)
{
this.paths = paths;
}
public Collection<Collection<String>> getNamePaths()
{
return namePaths;
}
public void setNamePaths(Collection<Collection<String>> namePaths)
{
this.namePaths = namePaths;
}
public QName getNodeType()
{
return nodeType;
}
public void setNodeType(QName nodeType)
{
this.nodeType = nodeType;
}
public Long getNodeId()
{
return nodeId;
}
public void setNodeId(Long nodeId)
{
this.nodeId = nodeId;
}
public Long getAclId()
{
return aclId;
}
public void setAclId(Long aclId)
{
this.aclId = aclId;
}
public Map<QName, Serializable> getProperties()
{
return properties;
}
public void setProperties(Map<QName, Serializable> properties)
{
this.properties = properties;
}
public Set<QName> getAspects()
{
return aspects;
}
public void setAspects(Set<QName> aspects)
{
this.aspects = aspects;
}
public List<ChildAssociationRef> getChildAssocs()
{
return childAssocs;
}
public void setChildAssocs(List<ChildAssociationRef> childAssocs)
{
this.childAssocs = childAssocs;
}
/**
* @param parentAssocs
* @param crc
*/
public void setParentAssocs(List<ChildAssociationRef> parentAssocs, Long parentAssocsCrc)
{
this.parentAssocs = parentAssocs;
this.parentAssocsCrc = parentAssocsCrc;
}
public List<ChildAssociationRef> getParentAssocs()
{
return parentAssocs;
}
public Long getParentAssocsCrc()
{
return parentAssocsCrc;
}
public List<Long> getChildIds()
{
return childIds;
}
public void setChildIds(List<Long> childIds)
{
this.childIds = childIds;
}
public Long getTxnId()
{
return txnId;
}
public void setTxnId(Long txnId)
{
this.txnId = txnId;
}
public String getTenantDomain()
{
return tenantDomain;
}
public void setTenantDomain(String tenantDomain)
{
this.tenantDomain = tenantDomain;
}
}