Class OmlBuilder

java.lang.Object
io.opencaesar.oml.util.OmlBuilder

public class OmlBuilder extends Object
The Builder for the model. This builder uses the OmlWrite API and provides additional features. It allows clients to specify cross references by IRI and defers their resolution and setting until the build process is finished. This allows clients to have a single-phase build process as opposed to the typical two-phase builds (where objects are created in the first phase, and cross references are set in the second phase).
  • Constructor Details

    • OmlBuilder

      public OmlBuilder(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
      Creates a new instance of the OML Builder for a given resource set
      Parameters:
      resourceSet - the given resource set
  • Method Details

    • getResourceSet

      public org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
      Gets the builder's resource set
      Returns:
      the builder's resource set
    • addToNewResources

      protected void addToNewResources(Ontology ontology, org.eclipse.emf.common.util.URI resourceURI)
      Creates a new resource with the given URI and adds the given ontology as its root The new resource will be created in the resource set and added to the set of new resources
      Parameters:
      ontology - the given ontology
      resourceURI - the given resourceURI
    • getNewResources

      public Collection<org.eclipse.emf.ecore.resource.Resource> getNewResources()
      Gets all the newly created resources by the builder
      Returns:
      a List of newly created resources
    • start

      public void start()
      Perform actions at the start of the building process
    • finish

      public void finish()
      Perform actions at the end of the building process
    • setCrossReference

      protected void setCrossReference(Ontology ontology, Element subject, org.eclipse.emf.ecore.EReference eRef, String objectIri)
      Sets the given eRef on the given subject to an object that is resolved by iri in the context of the given ontology Object iri resolution and setting of the cross reference is deferred until the building is finished
      Parameters:
      ontology - the given ontology
      subject - the given subject
      eRef - the given non-containment eReference
      objectIri - an iri of the object
    • setCrossReferences

      protected void setCrossReferences(Ontology ontology, Element subject, org.eclipse.emf.ecore.EReference eRef, List<String> objectIris)
      Sets the given eRef on the given subject to a List of objects that are resolved by iri in the context of the given ontology Object iri resolution and setting of the cross reference is deferred until the building is finished
      Parameters:
      ontology - the given ontology
      subject - the given subject
      eRef - the given non-containment eReference
      objectIris - a list of iris of objects
    • setContainmentReference

      protected void setContainmentReference(Ontology ontology, String subjectIri, org.eclipse.emf.ecore.EReference eRef, Element object)
      Sets the given object to be contained by the given subject that is resolved by iri in the context of the given ontology
      Parameters:
      ontology - the given ontology
      subjectIri - the given iri of a member to be resolved as subject
      eRef - the containment eRef to use on subject if it belongs to the given ontology
      object - the given object
    • resolve

      protected <T extends Member> T resolve(Class<T> type, Ontology context, String iri)
      Resolves the given iri to an element of the given type in the context of the given ontology This function will throw a RuntimeException if the element was not resolved
      Parameters:
      type - The given Oml type that is a subtype of IdentifiedElement
      context - The given ontology context
      iri - the given iri of the element
      Returns:
      an element with the given iri and type that is resolved in the context of the given ontology
    • addAnnotation

      public Annotation addAnnotation(Ontology ontology, String propertyIri, Literal literalValue, String referencedValueIri)
      Adds a new annotation with a literal or reference value (but not both) on a given ontology
      Parameters:
      ontology - the ontology to annotate
      propertyIri - the annotation property identified by iri
      literalValue - the annotation literal value
      referencedValueIri - the annotation (member) referenced value identified by iri
      Returns:
      a new annotation on the given ontology
    • addAnnotation

      public Annotation addAnnotation(Ontology ontology, IdentifiedElement element, String propertyIri, Literal literalValue, String referencedValueIri)
      Adds a new annotation with a literal or reference value (but not both) on a given annotated element in the context of a given ontology Note that if the element is already added to an ontology, it is expected to be the same as the given ontology
      Parameters:
      ontology - the context ontology that will have the annotation axiom
      element - the annotated element to put the annotation on
      propertyIri - the annotation property identified by iri
      literalValue - the annotation literal value
      referencedValueIri - the annotation (member) referenced value identified by iri
      Returns:
      a new annotation on the given annotated element in the context of the given ontology
    • addAnnotation

      public Annotation addAnnotation(Ontology ontology, String memberIri, String propertyIri, Literal literalValue, String referencedValueIri)
      Adds a new annotation with a literal or reference value (but not both) on a a given member (identified by iri) in the context of a given ontology
      Parameters:
      ontology - the context ontology that will have the annotation axiom
      memberIri - the iri of a member to put the annotation on
      propertyIri - the annotation property identified by iri
      literalValue - the annotation literal value
      referencedValueIri - the annotation (member) referenced value identified by iri
      Returns:
      a new annotation on the given member in the context of the given ontology
    • createVocabulary

      public Vocabulary createVocabulary(org.eclipse.emf.common.util.URI resourceURI, String namespace, String prefix)
      Creates a new vocabulary and add it as content of a resource with the given URI
      Parameters:
      resourceURI - the URI of a new resource to add the vocabulary to its contents
      namespace - the namespace of the new vocabulary
      prefix - the prefix of the new vocabulary
      Returns:
      a newly created vocabulary added to the contents of a resource with the given URI
    • createVocabularyBundle

      public VocabularyBundle createVocabularyBundle(org.eclipse.emf.common.util.URI resourceURI, String namespace, String prefix)
      Creates a new vocabulary bundle and add it as content of a resource with the given URI
      Parameters:
      resourceURI - the URI of a new resource to add the vocabulary bundle to its contents
      namespace - the namespace of the new vocabulary bundle
      prefix - the prefix of the new vocabulary bundle
      Returns:
      a newly created vocabulary bunel added to the contents of a resource with the given URI
    • createDescription

      public Description createDescription(org.eclipse.emf.common.util.URI resourceURI, String namespace, String prefix)
      Creates a new description and add it as content of a resource with the given URI
      Parameters:
      resourceURI - the URI of a new resource to add the description to its contents
      namespace - the namespace of the new description
      prefix - the prefix of the new description
      Returns:
      a newly created description added to the contents of a resource with the given URI
    • createDescriptionBundle

      public DescriptionBundle createDescriptionBundle(org.eclipse.emf.common.util.URI resourceURI, String namespace, String prefix)
      Creates a new description bundle and add it as content of a resource with the given URI
      Parameters:
      resourceURI - the URI of a new resource to add the description bundle to its contents
      namespace - the namespace of the new description bundle
      prefix - the prefix of the new description bundle
      Returns:
      a newly created description bundle added to the contents of a resource with the given URI
    • addAspect

      public Aspect addAspect(Vocabulary vocabulary, String name)
      Creates a new aspect and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new aspect
      Returns:
      a new aspect that is added to the given vocabulary
    • addConcept

      public Concept addConcept(Vocabulary vocabulary, String name)
      Creates a new concept and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new concept
      Returns:
      a new concept that is added to the given vocabulary
    • addRelationEntity

      public RelationEntity addRelationEntity(Vocabulary vocabulary, String name, List<String> sourceIris, List<String> targetIris, boolean functional, boolean inverseFunctional, boolean symmetric, boolean asymmetric, boolean reflexive, boolean irreflexive, boolean transitive)
      Creates a new relation entity and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new relation entity
      sourceIris - the iris of the source entities
      targetIris - the iris of the target entities
      functional - whether the relation entity is functional
      inverseFunctional - whether the relation entity is inverse functional
      symmetric - whether the relation entity is symmetric
      asymmetric - whether the relation entity is asymmetric
      reflexive - whether the relation entity is reflexive
      irreflexive - whether the relation entity is irreflexive
      transitive - whether the relation entity is transitive
      Returns:
      a new relation entity that is added to the given vocabulary
    • addStructure

      public Structure addStructure(Vocabulary vocabulary, String name)
      Creates a new structure and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new structure
      Returns:
      a new structure that is added to the given vocabulary
    • addAnnotationProperty

      public AnnotationProperty addAnnotationProperty(Vocabulary vocabulary, String name)
      Creates a new annotation property and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new annotation property
      Returns:
      a new annotation property that is added to the given vocabulary
    • addScalarProperty

      public ScalarProperty addScalarProperty(Vocabulary vocabulary, String name, List<String> domainIris, List<String> rangeIris, boolean functional)
      Creates a new scalar property and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new scalar property
      domainIris - the iris of the domain classifiers
      rangeIris - the iris of the range scalars
      functional - whether the scalar property is functional
      Returns:
      a new scalar property that is added to the given vocabulary
    • setScalarProperty

      public void setScalarProperty(Vocabulary vocabulary, String propertyIri, String domainIri, String rangeIri, Boolean functional)
      Sets a scalar property details in the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      propertyIri - the iri of the scalar property
      domainIri - the iri of a domain classifier
      rangeIri - the iri of a range scalar
      functional - whether the scalar property is functional (can be null)
    • addStructuredProperty

      public StructuredProperty addStructuredProperty(Vocabulary vocabulary, String name, List<String> domainIris, List<String> rangeIris, boolean functional)
      Creates a new structured property and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new structured property
      domainIris - the iris of the domain classifiers
      rangeIris - the iris of the range structures
      functional - whether the structured property is functional
      Returns:
      a new structured property that is added to the given vocabulary
    • setStructuredProperty

      public void setStructuredProperty(Vocabulary vocabulary, String propertyIri, String domainIri, String rangeIri, Boolean functional)
      Sets structured property details in the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      propertyIri - the iri of the structured property
      domainIri - the iri of a domain classifiers
      rangeIri - the iri of a range structures
      functional - whether the structured property is functional
    • addScalar

      public Scalar addScalar(Vocabulary vocabulary, String name)
      Creates a new scalar and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new faceted scalar
      Returns:
      a new scalar that is added to the given vocabulary
    • addForwardRelation

      public ForwardRelation addForwardRelation(RelationEntity entity, String name)
      Creates a forward relation and adds it to the given relation entity
      Parameters:
      entity - the context relation entity
      name - the name of the new forward relation
      Returns:
      a forward relation that is added to the given relation entity
    • addReverseRelation

      public ReverseRelation addReverseRelation(RelationBase base, String name)
      Creates a reverse relation and adds it to the given relation base
      Parameters:
      base - the context relation base
      name - the name of the new reverse relation
      Returns:
      a reverse relation that is added to the given relation base
    • addUnreifiedRelation

      public UnreifiedRelation addUnreifiedRelation(Vocabulary vocabulary, String name, List<String> sourceIris, List<String> targetIris, boolean functional, boolean inverseFunctional, boolean symmetric, boolean asymmetric, boolean reflexive, boolean irreflexive, boolean transitive)
      Creates a new unreified relation and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new relation
      sourceIris - the iri of the source entity
      targetIris - the iri of the target entity
      functional - whether the relation entity is functional
      inverseFunctional - whether the relation entity is inverse functional
      symmetric - whether the relation entity is symmetric
      asymmetric - whether the relation entity is asymmetric
      reflexive - whether the relation entity is reflexive
      irreflexive - whether the relation entity is irreflexive
      transitive - whether the relation entity is transitive
      Returns:
      a new relation entity that is added to the given vocabulary
    • setRelationBase

      public void setRelationBase(Vocabulary vocabulary, String relationIri, String sourceIri, String targetIri, Boolean functional, Boolean inverseFunctional, Boolean symmetric, Boolean asymmetric, Boolean reflexive, Boolean irreflexive, Boolean transitive)
      Sets relation base details in the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      relationIri - the iri of the relation
      sourceIri - the iri of a source entity
      targetIri - the iri of a target entity
      functional - whether the relation entity is functional
      inverseFunctional - whether the relation entity is inverse functional
      symmetric - whether the relation entity is symmetric
      asymmetric - whether the relation entity is asymmetric
      reflexive - whether the relation entity is reflexive
      irreflexive - whether the relation entity is irreflexive
      transitive - whether the relation entity is transitive
    • addRule

      public Rule addRule(Vocabulary vocabulary, String name, Predicate[] antecedent, Predicate[] consequent)
      Creates a rule and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new rule
      antecedent - a list of antecedent predicates of the rule
      consequent - a list of consequent predicates of the rule
      Returns:
      a rule that is added to the given vocabulary
    • addBuiltIn

      public BuiltIn addBuiltIn(Vocabulary vocabulary, String name)
      Creates a builtIn and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      name - the name of the new builtIn
      Returns:
      a builtIn that is added to the given vocabulary
    • createStructureInstance

      public StructureInstance createStructureInstance(Ontology ontology, String structureIri)
      Creates a structure instance and adds it to the given ontology
      Parameters:
      ontology - the context ontology
      structureIri - the iri of a structure that is the type of the structure instance
      Returns:
      a structure instance that is added to the given ontology
    • addConceptInstance

      public ConceptInstance addConceptInstance(Description description, String name)
      Creates a concept instance and adds it to the given description
      Parameters:
      description - the context description
      name - the name of the new concept instance
      Returns:
      a concept instance that is added to the given description
    • addRelationInstance

      public RelationInstance addRelationInstance(Description description, String name, List<String> sourceIris, List<String> targetIris)
      Creates a relation instance and adds it to the given description
      Parameters:
      description - the context description
      name - the name of the new relation instance
      sourceIris - a list of Iris for source instances
      targetIris - a list of Iris of target instances
      Returns:
      a relation instance that is added to the given description
    • setRelationInstance

      public void setRelationInstance(Description description, String relationInstanceIri, String sourceIri, String targetIri)
      Sets a relation instance details in the given description
      Parameters:
      description - the context description
      relationInstanceIri - the iri of a relation instance
      sourceIri - the iri of a source instance
      targetIri - the iri of a target instance
    • addImport

      public Import addImport(Ontology ontology, ImportKind kind, String namespace, String prefix)
      Creates an import and adds it to the given ontology
      Parameters:
      ontology - the importing ontology
      kind - the kind of import
      namespace - the namespace of the imported ontology
      prefix - the prefix of the imported ontology (optional)
      Returns:
      an import that is added to the importing ontology
    • addSpecializationAxiom

      public SpecializationAxiom addSpecializationAxiom(Vocabulary vocabulary, String subTermIri, String superTermIri)
      Creates a specialization axiom between two terms and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      subTermIri - the iri of the sub term
      superTermIri - the iri of the super term
      Returns:
      a specialization axiom that is added to the vocabulary
    • addClassifierEquivalenceAxiom

      public ClassifierEquivalenceAxiom addClassifierEquivalenceAxiom(Vocabulary vocabulary, String subClassifierIri, List<String> superClassifierIris)
      Creates a classifier equivalence axiom between the sub classifier and super classifiers and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      subClassifierIri - the given iri of sub classifier
      superClassifierIris - the given iris of super classifiers
      Returns:
      a classifier equivalence axiom that is added to the vocabulary
    • addScalarEquivalenceAxiom

      public ScalarEquivalenceAxiom addScalarEquivalenceAxiom(Vocabulary vocabulary, String subScalarIri, String superScalarIri, Integer length, Integer minLength, Integer maxLength, String pattern, String language, Literal minInclusive, Literal minExclusive, Literal maxInclusive, Literal maxExclusive)
      Creates a scalar equivalence axiom between the sub scalar and super scalar and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      subScalarIri - the given iri of sub scalar
      superScalarIri - the given iri of super scalar
      length - the length facet
      minLength - the min length facet
      maxLength - the max length facet
      pattern - the string pattern facet
      language - the language facet
      minInclusive - the min inclusive facet
      minExclusive - the min exclusive facet
      maxInclusive - the max inclusive facet
      maxExclusive - the max exclusive facet
      Returns:
      a scalar equivalence axiom that is added to the vocabulary
    • addPropertyEquivalenceAxiom

      public PropertyEquivalenceAxiom addPropertyEquivalenceAxiom(Vocabulary vocabulary, String subPropertyIri, String superPropertyIri)
      Creates a property equivalence axiom between the sub property and super property and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      subPropertyIri - the iri of the given sub property
      superPropertyIri - the iri of the given super property
      Returns:
      a property equivalence axiom that is added to the vocabulary
    • addPropertyRangeRestrictionAxiom

      public PropertyRangeRestrictionAxiom addPropertyRangeRestrictionAxiom(Vocabulary vocabulary, Object owner, String propertyIri, String rangeIri, RangeRestrictionKind restrictionKind)
      Creates a property range restriction axiom and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      owner - the owner (either a String representing the iri of the owning classifier, or the owning classifier equivalence axiom object)
      propertyIri - the iri of the restricted property
      rangeIri - the iri of the restricted range
      restrictionKind - the kind of the restriction
      Returns:
      a property range restriction axiom that is added to the given vocabulary
    • addPropertyCardinalityRestrictionAxiom

      public PropertyCardinalityRestrictionAxiom addPropertyCardinalityRestrictionAxiom(Vocabulary vocabulary, Object owner, String propertyIri, CardinalityRestrictionKind restrictionKind, int cardinality, String rangeIri)
      Creates a property cardinality restriction axiom and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      owner - the owner (either a String representing the iri of the owning classifier, or the owning classifier equivalence axiom object)
      propertyIri - the iri of the restricted property
      cardinality - the restricted cardinality
      rangeIri - the iri of the restricted range (optional)
      restrictionKind - the kind of the restriction
      Returns:
      a property cardinality restriction axiom that is added to the given vocabulary
    • addPropertyValueRestrictionAxiom

      public PropertyValueRestrictionAxiom addPropertyValueRestrictionAxiom(Vocabulary vocabulary, Object owner, String propertyIri, Literal literal)
      Creates a property value restriction axiom for a scalar property and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      owner - the owner (either a String representing the iri of the owning classifier, or the owning classifier equivalence axiom object)
      propertyIri - the iri of the restricted scalar property
      literal - the (literal) value of the restriction
      Returns:
      a property value restriction axiom that is added to the given vocabulary
    • addPropertyValueRestrictionAxiom

      public PropertyValueRestrictionAxiom addPropertyValueRestrictionAxiom(Vocabulary vocabulary, Object owner, String propertyIri, StructureInstance containedValue)
      Creates a property value restriction axiom for a structured property and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      owner - the owner (either a String representing the iri of the owning classifier, or the owning classifier equivalence axiom object)
      propertyIri - the iri of the restricted structured property
      containedValue - the contained value of the restriction
      Returns:
      a property value restriction axiom that is added to the given vocabulary
    • addPropertyValueRestrictionAxiom

      public PropertyValueRestrictionAxiom addPropertyValueRestrictionAxiom(Vocabulary vocabulary, Object owner, String relationIri, String referencedValueIri)
      Creates a property value restriction axiom for a relation and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      owner - the owner (either a String representing the iri of the owning classifier, or the owning classifier equivalence axiom object)
      relationIri - the iri of the restricted relation
      referencedValueIri - the Iri of a referenced value of the restriction
      Returns:
      a property value restriction axiom that is added to the given vocabulary
    • addPropertySelfRestrictionAxiom

      public PropertySelfRestrictionAxiom addPropertySelfRestrictionAxiom(Vocabulary vocabulary, Object owner, String relationIri)
      Creates a self restriction axiom on a relation and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      owner - the given restricting owner (classifier or classifier equivalence axiom)
      relationIri - the iri of the restricted relation
      Returns:
      a property value restriction axiom that is added to the given vocabulary
    • addKeyAxiom

      public KeyAxiom addKeyAxiom(Vocabulary vocabulary, String domainIri, List<String> keyPropertyIris)
      Creates a key axiom and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      domainIri - the iri of the (concept) domain
      keyPropertyIris - the list of iris of the properties that are part of the key
      Returns:
      a key axiom that is added to the given vocabulary
    • addInstanceEnumerationAxiom

      public InstanceEnumerationAxiom addInstanceEnumerationAxiom(Vocabulary vocabulary, String domainIri, List<String> instanceIris)
      Creates an instance enumeration axiom and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      domainIri - the iri of the (concept) domain
      instanceIris - the list of iris of the concept instances
      Returns:
      an instance enumeration axiom that is added to the given vocabulary
    • addLiteralEnumerationAxiom

      public LiteralEnumerationAxiom addLiteralEnumerationAxiom(Vocabulary vocabulary, String domainIri, Literal... literals)
      Creates an literal enumeration axiom and adds it to the given vocabulary
      Parameters:
      vocabulary - the context vocabulary
      domainIri - the iri of the (scalar) domain
      literals - the list of enumerated literals
      Returns:
      a literal enumeration axiom that is added to the given vocabulary
    • addTypeAssertion

      public TypeAssertion addTypeAssertion(Description description, String instanceIri, String typeIri)
      Creates a type assertion and adds it to the given description
      Parameters:
      description - the context description
      instanceIri - the iri of the named instance
      typeIri - the iri of the type
      Returns:
      a type assertion that is added to the given description
    • addPropertyValueAssertion

      public PropertyValueAssertion addPropertyValueAssertion(Ontology ontology, Object owner, String propertyIri, Literal literalValue)
      Creates a property value assertion for a scalar property and adds it to the given ontology
      Parameters:
      ontology - the context ontology
      owner - either a structure instance or the iri of a named instance
      propertyIri - the iri of the scalar property
      literalValue - the asserted (literal) value of the property
      Returns:
      a property value assertion that is added to the given description
    • addPropertyValueAssertion

      public PropertyValueAssertion addPropertyValueAssertion(Ontology ontology, Object owner, String propertyIri, StructureInstance containedValue)
      Creates a property value assertion for a structured property and adds it to the given ontology
      Parameters:
      ontology - the context ontology
      owner - either a structure instance or the iri of a named instance
      propertyIri - the iri of the structured property
      containedValue - the asserted contained value of the property
      Returns:
      a property value assertion that is added to the given description
    • addPropertyValueAssertion

      public PropertyValueAssertion addPropertyValueAssertion(Ontology ontology, Object owner, String propertyIri, String referencedValueIri)
      Creates a property value assertion for a relation and adds it to the given ontology
      Parameters:
      ontology - the context ontology
      owner - either a structure instance or the iri of a named instance
      propertyIri - the iri of the relation property
      referencedValueIri - the asserted referenced value (identified by iri) of the property
      Returns:
      a property value assertion that is added to the given description
    • createArgument

      public Argument createArgument(Vocabulary vocabulary, String variable, Literal literal, String instanceIri)
      Creates an argument
      Parameters:
      vocabulary - the context vocabulary
      variable - a given variable name
      literal - a given literal
      instanceIri - an IRI of a given named instance
      Returns:
      an argument
    • createTypePredicate

      public TypePredicate createTypePredicate(Vocabulary vocabulary, String typeIri, Argument argument)
      Creates a type predicate
      Parameters:
      vocabulary - the context vocabulary
      typeIri - the iri of the type
      argument - the argument bound to a value of the type
      Returns:
      a type predicate
    • createRelationEntityPredicate

      public RelationEntityPredicate createRelationEntityPredicate(Vocabulary vocabulary, String typeIri, Argument argument1, Argument argument, Argument argument2)
      Creates an relation entity predicate
      Parameters:
      vocabulary - the context vocabulary
      typeIri - the iri of the relation entity
      argument1 - the argument bound to a named instance representing the source of a relation instance
      argument - the argument bound to a relation instance
      argument2 - the argument bound to a named instance representing the target of a relation instance
      Returns:
      a relation entity predicate
    • createPropertyPredicate

      public PropertyPredicate createPropertyPredicate(Vocabulary vocabulary, String propertyIri, Argument argument1, Argument argument2)
      Creates a property predicate
      Parameters:
      vocabulary - the context vocabulary
      propertyIri - the iri of the property
      argument1 - the argument bound to a instance representing the subject of the given property
      argument2 - the argument bound to a value representing the object of the given property
      Returns:
      a relation predicate
    • createSameAsPredicate

      public SameAsPredicate createSameAsPredicate(Vocabulary vocabulary, Argument argument1, Argument argument2)
      Creates a sameAs predicate
      Parameters:
      vocabulary - the context vocabulary
      argument1 - the argument bound to the first named instance
      argument2 - the argument bound to the second named instance
      Returns:
      a sameAs predicate
    • createDifferentFromPredicate

      public DifferentFromPredicate createDifferentFromPredicate(Vocabulary vocabulary, Argument argument1, Argument argument2)
      Creates a differentFrom predicate
      Parameters:
      vocabulary - the context vocabulary
      argument1 - the argument bound to the first named instance
      argument2 - the argument bound to the second named instance
      Returns:
      a differentFrom predicate
    • createBuiltInPredicate

      public BuiltInPredicate createBuiltInPredicate(Vocabulary vocabulary, String builtInIri, Argument... arguments)
      Creates a builtIn predicate
      Parameters:
      vocabulary - the context vocabulary
      builtInIri - the given builtIn IRI
      arguments - the arguments of the builtin
      Returns:
      a builtIn predicate
    • createQuotedLiteral

      public QuotedLiteral createQuotedLiteral(Ontology ontology, String value, String typeIri, String langTag)
      Creates a quoted literal in the given ontology
      Parameters:
      ontology - the ontology context
      value - the lexical value of the literal
      typeIri - the iri of (scalar) type of the literal (optional)
      langTag - the language tag of the literal (optional)
      Returns:
      a quoted literal
    • createIntegerLiteral

      public IntegerLiteral createIntegerLiteral(int value)
      Creates an integer literal
      Parameters:
      value - the integer value of the literal
      Returns:
      an integer literal
    • createDecimalLiteral

      public DecimalLiteral createDecimalLiteral(BigDecimal value)
      Creates a decimal literal
      Parameters:
      value - the big decimal value of the literal
      Returns:
      a decimal literal
    • createDoubleLiteral

      public DoubleLiteral createDoubleLiteral(double value)
      Creates a double literal
      Parameters:
      value - the double value of the literal
      Returns:
      a double literal
    • createBooleanLiteral

      public BooleanLiteral createBooleanLiteral(boolean value)
      Creates an boolean literal
      Parameters:
      value - the boolean value of the literal
      Returns:
      a boolean literal
    • createLiteral

      public Literal createLiteral(Object value)
      Creates a literal
      Parameters:
      value - the value of the literal
      Returns:
      a literal