Class AxiomValueDescriptor
java.lang.Object
cz.cvut.kbss.ontodriver.descriptor.AbstractAxiomDescriptor
cz.cvut.kbss.ontodriver.descriptor.AxiomValueDescriptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssertion
(Assertion assertion) Adds the specified assertion to this descriptor.addAssertionValue
(Assertion assertion, Value<?> value) Adds a new value for the specified assertion.boolean
containsAssertion
(Assertion assertion) Checks whether this descriptor contains the specified assertion.boolean
getAssertionContext
(Assertion assertion) Gets context of the specified assertion.getAssertionContexts
(Assertion assertion) Gets the set of repository context identifiers in which the specified assertion values may be.Gets unmodifiable view of the properties in this descriptor.getAssertionValues
(Assertion assertion) Gets values of the specified assertion held by this descriptor.Gets the set of repository context identifiers in which this descriptor's subject may be.int
hashCode()
void
setAssertionContext
(Assertion assertion, URI context) Sets context for the specified assertion.void
setSubjectContext
(URI context) Sets subject context.toString()
Methods inherited from class cz.cvut.kbss.ontodriver.descriptor.AbstractAxiomDescriptor
getSubject
-
Constructor Details
-
AxiomValueDescriptor
-
-
Method Details
-
setSubjectContext
Sets subject context.- Parameters:
context
- The context to use for subject
-
getSubjectContext
-
addAssertion
Adds the specified assertion to this descriptor.- Parameters:
assertion
- The assertion to add- Throws:
NullPointerException
- Whenassertion
isnull
-
getAssertions
Gets unmodifiable view of the properties in this descriptor.- Specified by:
getAssertions
in classAbstractAxiomDescriptor
- Returns:
- Set of assertions in this descriptor
-
containsAssertion
Checks whether this descriptor contains the specified assertion.- Specified by:
containsAssertion
in classAbstractAxiomDescriptor
- Parameters:
assertion
- The assertion to check- Returns:
- True if the assertion is already present in this descriptor, false otherwise
-
getSubjectContexts
Description copied from class:AbstractAxiomDescriptor
Gets the set of repository context identifiers in which this descriptor's subject may be.The contract of this method is as follows: it must not return
null
, if the the subject is in the default context, an empty set is returned.- Specified by:
getSubjectContexts
in classAbstractAxiomDescriptor
- Returns:
- Set of context identifiers
-
getAssertionContexts
Description copied from class:AbstractAxiomDescriptor
Gets the set of repository context identifiers in which the specified assertion values may be.If no context was explicitly set, the same contexts as the subject's are returned. An empty result indicates that the default context should be used.
- Specified by:
getAssertionContexts
in classAbstractAxiomDescriptor
- Returns:
- Set of context identifiers
-
getAssertionContext
Gets context of the specified assertion.If the context was not explicitly set, the same context as the subject's is returned.
- Parameters:
assertion
- Assertion for which context should be resolved- Returns:
- Assertion context
-
setAssertionContext
Sets context for the specified assertion.Note that the assertion has to be already present in this descriptor.
- Parameters:
assertion
- The property to set context forcontext
- Context URI- Throws:
IllegalArgumentException
- If there is no such assertion in this descriptorNullPointerException
- Whenassertion
isnull
-
addAssertionValue
Adds a new value for the specified assertion.- Parameters:
assertion
- The assertionvalue
- The value to add- Returns:
- This descriptor
- Throws:
NullPointerException
- if either of the arguments isnull
-
getAssertionValues
Gets values of the specified assertion held by this descriptor.- Parameters:
assertion
- The assertion- Returns:
- Unmodifiable list of values or an empty list, if there are none
- Throws:
NullPointerException
- If the argument isnull
-
equals
- Overrides:
equals
in classAbstractAxiomDescriptor
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractAxiomDescriptor
-
toString
-