Package hydra.rdf.syntax
Class Property
- java.lang.Object
-
- hydra.rdf.syntax.Property
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Property>
public class Property extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Property>
A type representing an RDF property, and encapsulating its domain, range, and subclass relationships- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Set<RdfsClass>domainState that any resource that has a given property is an instance of one or more classesstatic NameDOMAINName of thehydra.rdf.syntax.Property.domainfield.java.util.Set<RdfsClass>rangeStates that the values of a property are instances of one or more classesstatic NameRANGEName of thehydra.rdf.syntax.Property.rangefield.static NameSUB_PROPERTY_OFName of thehydra.rdf.syntax.Property.subPropertyOffield.java.util.Set<Property>subPropertyOfstatic NameTYPE_Name of thehydra.rdf.syntax.Propertytype.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Property other)booleanequals(java.lang.Object other)inthashCode()PropertywithDomain(java.util.Set<RdfsClass> domain)Returns a copy of thisPropertywithdomainreplaced.PropertywithRange(java.util.Set<RdfsClass> range)Returns a copy of thisPropertywithrangereplaced.PropertywithSubPropertyOf(java.util.Set<Property> subPropertyOf)Returns a copy of thisPropertywithsubPropertyOfreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.rdf.syntax.Propertytype.
-
DOMAIN
public static final Name DOMAIN
Name of thehydra.rdf.syntax.Property.domainfield.
-
RANGE
public static final Name RANGE
Name of thehydra.rdf.syntax.Property.rangefield.
-
SUB_PROPERTY_OF
public static final Name SUB_PROPERTY_OF
Name of thehydra.rdf.syntax.Property.subPropertyOffield.
-
domain
public final java.util.Set<RdfsClass> domain
State that any resource that has a given property is an instance of one or more classes
-
range
public final java.util.Set<RdfsClass> range
States that the values of a property are instances of one or more classes
-
subPropertyOf
public final java.util.Set<Property> subPropertyOf
-
-
Constructor Detail
-
Property
public Property(java.util.Set<RdfsClass> domain, java.util.Set<RdfsClass> range, java.util.Set<Property> subPropertyOf)
Constructs an immutableProperty.- Parameters:
domain- State that any resource that has a given property is an instance of one or more classesrange- States that the values of a property are instances of one or more classes
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Property other)
- Specified by:
compareToin interfacejava.lang.Comparable<Property>
-
withDomain
public Property withDomain(java.util.Set<RdfsClass> domain)
Returns a copy of thisPropertywithdomainreplaced.
-
withRange
public Property withRange(java.util.Set<RdfsClass> range)
Returns a copy of thisPropertywithrangereplaced.
-
-