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