public class Link
extends java.lang.Object
Constructor and Description |
---|
Link(Graph sourceGraph,
Reference typeRef,
Literal targetLit)
Constructor.
|
Link(Graph sourceGraph,
Reference typeRef,
java.lang.Object target)
Constructor.
|
Link(Graph sourceGraph,
Reference typeRef,
Reference targetRef)
Constructor.
|
Link(Graph sourceGraph,
java.lang.String typeRef,
Literal targetLit)
Constructor.
|
Link(Graph sourceGraph,
java.lang.String typeRef,
java.lang.Object target)
Constructor.
|
Link(Graph sourceGraph,
java.lang.String typeRef,
Reference targetRef)
Constructor.
|
Link(Link from)
Constructor by copy.
|
Link(Reference sourceRef,
Reference typeRef,
Literal targetLit)
Constructor.
|
Link(Reference sourceRef,
Reference typeRef,
Reference targetRef)
Constructor.
|
Link(Reference sourceRef,
java.lang.String typeRef,
Literal targetLit)
Constructor.
|
Link(Reference sourceRef,
java.lang.String typeRef,
Reference targetRef)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static Reference |
createBlankRef(java.lang.String identifier)
Creates a reference to a blank node.
|
java.lang.Object |
getSource()
Returns the source which can be either a reference or a link or a graph
or null.
|
Graph |
getSourceAsGraph()
Returns the source graph.
|
Link |
getSourceAsLink()
Returns the source link.
|
Reference |
getSourceAsReference()
Returns the source resource reference.
|
java.lang.Object |
getTarget()
Returns the target which can be either a literal or a reference or is
null.
|
Graph |
getTargetAsGraph()
Returns the target graph.
|
Link |
getTargetAsLink()
Returns the target link.
|
Literal |
getTargetAsLiteral()
Returns the target literal.
|
Reference |
getTargetAsReference()
Returns the target resource reference.
|
Reference |
getTypeRef()
Returns the type reference.
|
boolean |
hasGraphSource()
Indicates if the source is a graph.
|
boolean |
hasGraphTarget()
Indicates if the target is a graph.
|
boolean |
hasLinkSource()
Indicates if the source is a link.
|
boolean |
hasLinkTarget()
Indicates if the target is a link.
|
boolean |
hasLiteralTarget()
Indicates if the target is a literal.
|
boolean |
hasReferenceSource()
Indicates if the source is a reference.
|
boolean |
hasReferenceTarget()
Indicates if the target is a reference.
|
static boolean |
isBlankRef(Reference reference)
Indicates if a reference is identifying a blank node.
|
void |
setSource(Graph sourceGraph)
Sets the source as a graph.
|
void |
setSource(Link sourceLink)
Sets the source as a link.
|
void |
setSource(Reference sourceRef)
Sets the source resource reference.
|
void |
setTarget(Graph targetGraph)
Sets the target as a graph.
|
void |
setTarget(Link targetLink)
Sets the target as a link.
|
void |
setTarget(Literal targetLit)
Sets the target literal.
|
void |
setTarget(Reference targetRef)
Sets the target as a resource reference.
|
void |
setTypeRef(Reference typeRef)
Sets the type reference.
|
public Link(Graph sourceGraph, Reference typeRef, Literal targetLit)
sourceGraph
- The source graph or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetLit
- The target literal or object in RDF terminology.public Link(Graph sourceGraph, Reference typeRef, java.lang.Object target)
sourceGraph
- The source graph or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.target
- The target node or object in RDF terminology.public Link(Graph sourceGraph, Reference typeRef, Reference targetRef)
sourceGraph
- The source graph or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetRef
- The target reference or object in RDF terminology.public Link(Graph sourceGraph, java.lang.String typeRef, Literal targetLit)
sourceGraph
- The source graph or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetLit
- The target literal or object in RDF terminology.public Link(Graph sourceGraph, java.lang.String typeRef, java.lang.Object target)
sourceGraph
- The source graph or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.target
- The target node or object in RDF terminology.public Link(Graph sourceGraph, java.lang.String typeRef, Reference targetRef)
sourceGraph
- The source graph or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetRef
- The target reference or object in RDF terminology.public Link(Link from)
from
- The link to copy from.public Link(Reference sourceRef, Reference typeRef, Literal targetLit)
sourceRef
- The source resource reference or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetLit
- The target literal node or object in RDF terminology.public Link(Reference sourceRef, Reference typeRef, Reference targetRef)
sourceRef
- The source resource reference or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetRef
- The target resource reference or object in RDF terminology.public Link(Reference sourceRef, java.lang.String typeRef, Literal targetLit)
sourceRef
- The source resource reference or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetLit
- The target literal node or object in RDF terminology.public Link(Reference sourceRef, java.lang.String typeRef, Reference targetRef)
sourceRef
- The source resource reference or subject in RDF terminology.typeRef
- The type reference or predicate in RDF terminology.targetRef
- The target resource reference or object in RDF terminology.public static Reference createBlankRef(java.lang.String identifier)
identifier
- The blank node identifier.public static boolean isBlankRef(Reference reference)
reference
- The reference to test.createBlankRef(String)
public java.lang.Object getSource()
public Graph getSourceAsGraph()
getSource()
public Link getSourceAsLink()
getSource()
public Reference getSourceAsReference()
getSource()
public java.lang.Object getTarget()
public Graph getTargetAsGraph()
getTarget()
public Link getTargetAsLink()
getTarget()
public Literal getTargetAsLiteral()
getTarget()
public Reference getTargetAsReference()
getTarget()
public Reference getTypeRef()
public boolean hasGraphSource()
public boolean hasGraphTarget()
public boolean hasLinkSource()
public boolean hasLinkTarget()
public boolean hasLiteralTarget()
public boolean hasReferenceSource()
public boolean hasReferenceTarget()
public void setSource(Graph sourceGraph)
sourceGraph
- The source graph.public void setSource(Link sourceLink)
sourceLink
- The source link.public void setSource(Reference sourceRef)
sourceRef
- The source resource reference.public void setTarget(Graph targetGraph)
targetGraph
- The target graph.public void setTarget(Link targetLink)
targetLink
- The target link.public void setTarget(Literal targetLit)
targetLit
- The target literal.public void setTarget(Reference targetRef)
targetRef
- The target resource reference.public void setTypeRef(Reference typeRef)
typeRef
- The type reference.Copyright © 2005-2020 Restlet.