Class 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 Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.rdf.syntax.Property type.
      • DOMAIN

        public static final Name DOMAIN
        Name of the hydra.rdf.syntax.Property.domain field.
      • RANGE

        public static final Name RANGE
        Name of the hydra.rdf.syntax.Property.range field.
      • SUB_PROPERTY_OF

        public static final Name SUB_PROPERTY_OF
        Name of the hydra.rdf.syntax.Property.subPropertyOf field.
      • 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 immutable Property.
        Parameters:
        domain - State that any resource that has a given property is an instance of one or more classes
        range - 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(Property other)
        Specified by:
        compareTo in interface java.lang.Comparable<Property>
      • withDomain

        public Property withDomain​(java.util.Set<RdfsClass> domain)
        Returns a copy of this Property with domain replaced.
      • withRange

        public Property withRange​(java.util.Set<RdfsClass> range)
        Returns a copy of this Property with range replaced.
      • withSubPropertyOf

        public Property withSubPropertyOf​(java.util.Set<Property> subPropertyOf)
        Returns a copy of this Property with subPropertyOf replaced.