OWLEntity.java revision 2
52N/A// The MIT License
52N/A//
52N/A// Copyright (c) 2004 Evren Sirin
52N/A//
121N/A// Permission is hereby granted, free of charge, to any person obtaining a copy
52N/A// of this software and associated documentation files (the "Software"), to
52N/A// deal in the Software without restriction, including without limitation the
52N/A// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
52N/A// sell copies of the Software, and to permit persons to whom the Software is
52N/A// furnished to do so, subject to the following conditions:
52N/A//
52N/A// The above copyright notice and this permission notice shall be included in
52N/A// all copies or substantial portions of the Software.
52N/A//
52N/A// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52N/A// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52N/A// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52N/A// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52N/A// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
52N/A// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
52N/A// IN THE SOFTWARE.
52N/A
52N/A/*
52N/A * Created on Nov 20, 2004
52N/A */
52N/Apackage org.mindswap.owl;
52N/A
52N/Aimport java.net.URI;
52N/A
52N/A/**
52N/A * Genric interface for OWL classes, properties and individuals.
52N/A *
52N/A * @author Evren Sirin
52N/A */
52N/Apublic interface OWLEntity extends OWLObject {
52N/A public OWLOntology getOntology();
52N/A
6N/A public OWLKnowledgeBase getKB();
6N/A
6N/A /**
6N/A * Check if this resource represents an anonymous node
6N/A *
15N/A * @return
6N/A */
6N/A public boolean isAnon();
121N/A
6N/A /**
15N/A * Return the URI for this resource. If this resource is anonymous then null value will be returned
6N/A *
6N/A * @return
6N/A */
6N/A public URI getURI();
6N/A
6N/A public String getLocalName();
6N/A
6N/A public String getQName();
6N/A
6N/A public Object getAnonID();
6N/A
15N/A /**
6N/A * Get the rdfs:label for this resource. This function will look for labels with different language
6N/A * codes according to the settings defined in {@link org.mindswap.owl.OWLConfig#DEFAULT_LANGS OWLConfig}
6N/A *
6N/A * @return
6N/A */
6N/A public String getLabel();
6N/A
6N/A /**
6N/A * Get the rdfs:label with the specified language code. If the label for the given language does not
6N/A * exist return null even a label is found for another language. Use {@link #getLabel()
6N/A * getLabel()} to be more flexible.
121N/A *
121N/A * @param lang
121N/A * @return
6N/A */
6N/A public String getLabel(String lang);
15N/A
15N/A /**
15N/A * Return all labels written in any language.
15N/A *
15N/A * @return List of data values or empty list
15N/A */
15N/A public OWLDataValueList getLabels();
15N/A
15N/A /**
15N/A * Set the value of rdfs:label for this resource. Empty language identifier will be used.
44N/A *
44N/A * @param label
44N/A */
44N/A public void setLabel(String label);
44N/A
44N/A public void setLabel(String label, String lang);
6N/A
6N/A public OWLDataValue getAnnotation(URI prop);
6N/A
6N/A public OWLDataValue getAnnotation(URI prop, String lang);
6N/A
6N/A public OWLDataValueList getAnnotations(URI prop);
6N/A
6N/A public void addAnnotation(URI property, OWLDataValue value);
6N/A
6N/A public void addAnnotation(URI property, String value);
6N/A
6N/A public void addAnnotation(URI property, String value, String lang);
6N/A
6N/A public void setAnnotation(URI property, OWLDataValue value);
6N/A
6N/A public void setAnnotation(URI property, String value);
6N/A
6N/A public void setAnnotation(URI property, String value, String lang);
6N/A
6N/A public void removeAnnotations(URI property);
6N/A
6N/A /**
63N/A * Return a (more or less) user-friendly string representation. Tries getLabel() first and
63N/A * drops to toString() if there is no label.
63N/A *
63N/A * @return
63N/A */
63N/A public String toPrettyString();
63N/A}
63N/A