org.mindswap.rdfparser.rdf
Class RDFProperty
java.lang.Object
|
+--org.mindswap.rdfparser.rdf.RDFResource
|
+--org.mindswap.rdfparser.rdf.RDFProperty
- All Implemented Interfaces:
- java.lang.Cloneable, RDFConsts, java.io.Serializable
- Direct Known Subclasses:
- DAMLProperty, OWLAllValuesFrom, OWLCardinality, OWLComplementOf, OWLDatatypeProperty, OWLDifferentIndividualFrom, OWLDisjointUnionOf, OWLDisjointWith, OWLFunctionalProperty, OWLHasValue, OWLImports, OWLIntersectionOf, OWLInverseOf, OWLMaxCardinality, OWLMinCardinality, OWLObjectProperty, OWLOneOf, OWLOnProperty, OWLSameAs, OWLSameIndividualAs, OWLSomeValuesFrom, OWLUnionOf, OWLVersionInfo, RDFComment, RDFDomain, RDFFirst, RDFIsDefinedBy, RDFLabel, RDFLi, RDFNil, RDFObject, RDFPredicate, RDFPropertyImpl, RDFRange, RDFRest, RDFSeeAlso, RDFSubClassOf, RDFSubject, RDFSubPropertyOf, RDFType, RDFValue
- public class RDFProperty
- extends RDFResource
Title:
Description:
Copyright: Copyright (c) 2001
Company:
- Author:
- Michael Grove
- See Also:
- Serialized Form
| Fields inherited from interface org.mindswap.rdfparser.consts.RDFConsts |
OLD_DAMLURL, RDF, RDF_About, RDF_AboutEach, RDF_AboutEachPrefix, RDF_Alt, RDF_Bag, RDF_BagID, RDF_Class, RDF_Comment, RDF_ConstraintProperty, RDF_Description, RDF_Domain, RDF_First, RDF_ID, RDF_IsDefinedBy, RDF_Label, RDF_Li, RDF_Nil, RDF_NodeID, RDF_Object, RDF_ParseType, RDF_Predicate, RDF_Property, RDF_Range, RDF_Resource, RDF_Rest, RDF_SeeAlso, RDF_Seq, RDF_SubClass, RDF_Subject, RDF_SubProperty, RDF_TERMS, RDF_Type, RDF_Value, RDFSURL, RDFURL |
| Methods inherited from class org.mindswap.rdfparser.rdf.RDFResource |
addAttributes, addEquivalentTo, addNodes, getAttributeByName, getAttributes, getComment, getEquivalentTos, getFriendlyId, getFriendlyType, getId, getLabel, getNodes, getNTriples, getResourceByType, getTriples, getURI, removeEquivalentTo, setAttributes, setComment, setEquivalentTos, setId, setLabel, toRDF, toRDF, toString |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
NONE
public static final int NONE
LITERAL
public static final int LITERAL
URI
public static final int URI
RESOURCE
public static final int RESOURCE
COLLECTION
public static final int COLLECTION
RDFProperty
public RDFProperty()
RDFProperty
public RDFProperty(java.lang.String s)
clone
public java.lang.Object clone()
- Description copied from class:
RDFResource
- Makes a copy of this object.
- Overrides:
clone in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- A copy of this object
getType
public java.lang.String getType()
- Description copied from class:
RDFResource
- Returns the type of this object as a string.
- Overrides:
getType in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- the object's type
- See Also:
XMLConsts,
RDFConsts,
DAMLConsts,
OWLConsts
addNode
public void addNode(RDFResource r)
- Description copied from class:
RDFResource
- Adds a single resource node.
- Overrides:
addNode in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Parameters:
r - Resource to add
addAttribute
public void addAttribute(java.lang.String key,
java.lang.String value)
- Description copied from class:
RDFResource
- Adds an attribute with specified name and value to this resource.
- Overrides:
addAttribute in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Parameters:
key - Attribute namevalue - Attribute value
addRestrictions
public void addRestrictions(RDFResourceList list)
addRestriction
public void addRestriction(org.mindswap.parserutils.interfaces.Restriction t)
getRestrictions
public RDFResourceList getRestrictions()
setRestrictions
public void setRestrictions(RDFResourceList v)
createInstance
public RDFPropertyImpl createInstance()
equals
public boolean equals(java.lang.Object obj)
- Description copied from class:
RDFResource
- Compares to resources for equivalence.
- Overrides:
equals in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- true of the resources are equal, false otherwise
addDomain
public void addDomain(java.lang.String d)
getDomains
public java.util.Vector getDomains()
isInDomain
public boolean isInDomain(java.util.Vector v)
setValue
public void setValue(java.lang.Object s)
setValue
public void setValue(java.lang.Object s,
int type)
getValue
public java.lang.Object getValue()
getValueType
public int getValueType()
setValueType
public void setValueType(int x)
getRanges
public java.util.Vector getRanges()
isInRange
public boolean isInRange(java.lang.String s)
addRange
public void addRange(java.lang.String r)
hasAncestor
public boolean hasAncestor(java.lang.String ancestor)
hasSuperProperty
public boolean hasSuperProperty(java.lang.String parent)
getSuperProperties
public java.util.Vector getSuperProperties()
isActive
public boolean isActive()
getSameProperties
public java.util.Vector getSameProperties()
getMaxCardinality
public int getMaxCardinality()
getMinCardinality
public int getMinCardinality()
hasAncestor
public boolean hasAncestor(RDFResource obj)
hasInDomain
public boolean hasInDomain(RDFClass c)
hasInRange
public boolean hasInRange(RDFResource ri)
isDataType
public boolean isDataType()
validate
public void validate(java.util.Hashtable props)
throws InvalidDataException
toRDF
public java.lang.String toRDF(Namespaces ns,
int ind)
- Description copied from class:
RDFResource
- Returns the RDF representation of this class as a String
- Overrides:
toRDF in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- The string RDF representation
- See Also:
RDFResource.toRDF(),
RDFResource.toRDF(org.mindswap.xmlparser.Namespaces)
getNTriples
public org.mindswap.n3.ntriples.NTripleList getNTriples(Namespaces ns)
- Description copied from class:
RDFResource
- Return a list of NTriples that are equivalent to this resource.
- Overrides:
getNTriples in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- The NTriples that correspond to this resource
- See Also:
RDFResource.getNTriples(),
RDFResource.getNTriples(String, org.mindswap.xmlparser.Namespaces)
getNTriples
public org.mindswap.n3.ntriples.NTripleList getNTriples(java.lang.String subject,
Namespaces ns)
- Description copied from class:
RDFResource
- Return a list of NTriples that are equivalent to this resource.
- Overrides:
getNTriples in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- The NTriples that correspond to this resource
- See Also:
RDFResource.getNTriples(),
RDFResource.getNTriples(org.mindswap.xmlparser.Namespaces)
getTriples
public java.util.Vector getTriples(java.lang.String subject,
Namespaces ns)
- Description copied from class:
RDFResource
- Return a list of generic Triples that are equivalent to this resource.
- Overrides:
getTriples in class RDFResource
- Following copied from class:
org.mindswap.rdfparser.rdf.RDFResource
- Returns:
- Triples that correspond to this resource
- See Also:
RDFResource.getTriples(org.mindswap.xmlparser.Namespaces)