public class Relationship extends RdfModelObject implements Comparable<Relationship>
| Modifier and Type | Class and Description |
|---|---|
static class |
Relationship.RelationshipType |
| Modifier and Type | Field and Description |
|---|---|
static Map<Relationship.RelationshipType,String> |
RELATIONSHIP_TYPE_TO_TAG
Deprecated.
|
static Map<String,Relationship.RelationshipType> |
TAG_TO_RELATIONSHIP_TYPE
Deprecated.
|
model, modelContainer, node, refreshOnGet, resource| Constructor and Description |
|---|
Relationship(IModelContainer modelContainer,
com.hp.hpl.jena.graph.Node node) |
Relationship(SpdxElement relatedSpdxElement,
Relationship.RelationshipType relationshipType,
String comment) |
| Modifier and Type | Method and Description |
|---|---|
Relationship |
clone() |
Relationship |
clone(Map<String,SpdxElement> clonedElementIds) |
int |
compareTo(Relationship o) |
boolean |
equivalent(IRdfModel o)
Returns true if the compare object contains properties which would be equal if they were contained in the same RDF Model
|
String |
getComment() |
void |
getPropertiesFromModel()
Fetch all of the properties from the model and populate the local Java properties
|
SpdxElement |
getRelatedSpdxElement() |
Relationship.RelationshipType |
getRelationshipType() |
com.hp.hpl.jena.rdf.model.Resource |
getType(com.hp.hpl.jena.rdf.model.Model model) |
String |
getUri(IModelContainer modelContainer)
Get the URI for this RDF object.
|
void |
populateModel()
Populate the RDF model from the Java properties
|
void |
setComment(String comment) |
void |
setRelatedSpdxElement(SpdxElement relatedSpdxElement) |
void |
setRelationshipType(Relationship.RelationshipType relationshipType) |
List<String> |
verify() |
addPropertyUriValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, arraysEquivalent, createResource, createResource, equals, equivalentConsideringNull, findAnnotationPropertyValues, findAnyLicenseInfoPropertyValue, findAnyLicenseInfoPropertyValues, findChecksumPropertyValue, findCreationInfoPropertyValue, findDuplicateResource, findElementPropertyValue, findExternalDocRefPropertyValues, findExternalDocRefPropertyValues, findMultipleChecksumPropertyValues, findMultipleDoapPropertyValues, findMultipleElementPropertyValues, findMultiplePropertyValues, findRelationshipPropertyValues, findReviewPropertyValues, findSinglePropertyValue, findUriPropertyValue, findUriPropertyValues, findVerificationCodePropertyValue, getNode, hashCode, isRefreshOnGet, removePropertyValue, resourcesEqual, setMultipleObjectsForSameNode, setPropertyUriValue, setPropertyUriValues, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setSingleObjectForSameNode@Deprecated public static final Map<Relationship.RelationshipType,String> RELATIONSHIP_TYPE_TO_TAG
@Deprecated public static final Map<String,Relationship.RelationshipType> TAG_TO_RELATIONSHIP_TYPE
public Relationship(SpdxElement relatedSpdxElement, Relationship.RelationshipType relationshipType, String comment)
relatedSpdxElement - The SPDX Element that is relatedrelationshipType - Type of relationship - See the specification for a description of the typescomment - optional comment for the relationshippublic Relationship(IModelContainer modelContainer, com.hp.hpl.jena.graph.Node node) throws InvalidSPDXAnalysisException
model - Model containing the relationshipnode - Node describing the relationshipInvalidSPDXAnalysisExceptionpublic void getPropertiesFromModel()
throws InvalidSPDXAnalysisException
RdfModelObjectgetPropertiesFromModel in class RdfModelObjectInvalidSPDXAnalysisExceptionpublic com.hp.hpl.jena.rdf.model.Resource getType(com.hp.hpl.jena.rdf.model.Model model)
getType in class RdfModelObjectpublic void populateModel()
throws InvalidSPDXAnalysisException
RdfModelObjectpopulateModel in class RdfModelObjectInvalidSPDXAnalysisExceptionpublic String getUri(IModelContainer modelContainer)
RdfModelObjectgetUri in class RdfModelObjectpublic Relationship.RelationshipType getRelationshipType()
public void setRelationshipType(Relationship.RelationshipType relationshipType) throws InvalidSPDXAnalysisException
relationshipType - the relationshipType to setInvalidSPDXAnalysisExceptionpublic String getComment()
public void setComment(String comment)
comment - the comment to setpublic SpdxElement getRelatedSpdxElement()
public void setRelatedSpdxElement(SpdxElement relatedSpdxElement) throws InvalidSPDXAnalysisException
relatedSpdxElement - the relatedSpdxElement to setInvalidSPDXAnalysisExceptionpublic Relationship clone()
public boolean equivalent(IRdfModel o)
IRdfModelequivalent in interface IRdfModelpublic Relationship clone(Map<String,SpdxElement> clonedElementIds)
clonedElementIds - public int compareTo(Relationship o)
compareTo in interface Comparable<Relationship>Copyright © 2016 Linux Foundation. All Rights Reserved.