org.opentox.toxotis.ontology
Interface MetaInfo

All Superinterfaces:
IHTMLSupport, Serializable
All Known Implementing Classes:
MetaInfoImpl

public interface MetaInfo
extends Serializable, IHTMLSupport

Interface describing meta-information for a resource.

The term metadata is usually used to describe data about data that include a definition, description and other auxiliary information about the underlying resource. The interface MetaInfo provides access to a set of such metadata about a resource. Such are the identifier, the title and other related meta. Formally these are included in the Dublin Core ontology for modeling meta-data and partially in the OpenTox ontology (e.g. hasSource) for modeling some OT-specific properties. The list of attributes that compile the list of generic meta-information in this class inludes:

Author:
Sopasakis Pantelis
See Also:
http://dublincore.org/documents/usageguide/elements.shtml

Method Summary
 MetaInfo addAudience(LiteralValue... audience)
           
 MetaInfo addAudience(String... audience)
           
 MetaInfo addComment(LiteralValue... comment)
          Add comments to the current instance of MetaInfo
 MetaInfo addComment(String... comment)
          Add comments to the current instance of MetaInfo
 MetaInfo addContributor(LiteralValue... contributor)
           
 MetaInfo addContributor(String... contributor)
           
 MetaInfo addCreator(LiteralValue... creator)
           
 MetaInfo addCreator(String... creator)
           
 MetaInfo addDescription(LiteralValue... description)
           
 MetaInfo addDescription(String... description)
           
 MetaInfo addHasSource(ResourceValue hasSource)
           
 MetaInfo addIdentifier(LiteralValue... identifier)
           
 MetaInfo addIdentifier(String... identifier)
           
 MetaInfo addPublisher(LiteralValue... publisher)
           
 MetaInfo addPublisher(String... publisher)
           
 MetaInfo addRights(LiteralValue... rights)
           
 MetaInfo addRights(String... rights)
           
 MetaInfo addSameAs(ResourceValue value)
           
 MetaInfo addSeeAlso(ResourceValue value)
           
 MetaInfo addSubject(LiteralValue... subject)
           
 MetaInfo addSubject(String... subject)
           
 MetaInfo addTitle(LiteralValue... value)
           
 MetaInfo addTitle(String... value)
           
 com.hp.hpl.jena.rdf.model.Resource attachTo(com.hp.hpl.jena.rdf.model.Resource resource, com.hp.hpl.jena.ontology.OntModel model)
          Attaches the meta data to a given resource in an ontological model returning the updated resource.
 Set<LiteralValue> getAudiences()
           
 Set<LiteralValue> getComments()
          The property rdfs:comment is used to provide a human-readable description of a resource.
 Set<LiteralValue> getContributors()
           
 Set<LiteralValue> getCreators()
          The creator is an entity primarily responsible for making the content of the resource.
 LiteralValue getDate()
           
 Set<LiteralValue> getDescriptions()
          An account of the content of the resource.
 long getHash()
           
 Set<ResourceValue> getHasSources()
           
 Set<LiteralValue> getIdentifiers()
          Get the identifier (ID) of the described entity.
 Set<LiteralValue> getPublishers()
           
 Set<LiteralValue> getRights()
          Copyright notes for the underlying resource.
 Set<ResourceValue> getSameAs()
          The built-in OWL property owl:sameAs links an individual to an individual (i.e.
 Set<ResourceValue> getSeeAlso()
          Related to the datatype ontological property rdfs:seeAlso.
 Set<LiteralValue> getSubjects()
          Get the topic of the content of the resource.
 Set<LiteralValue> getTitles()
          Get the name given to the resource.
 boolean isEmpty()
          Check whether the meta info object is empty.
 MetaInfo setAudiences(Set<LiteralValue> audiences)
           
 MetaInfo setComments(Set<LiteralValue> comments)
          Setter for comments as a set.
 MetaInfo setContributors(Set<LiteralValue> contributors)
           
 MetaInfo setCreators(Set<LiteralValue> creators)
           
 MetaInfo setDate(LiteralValue date)
           
 MetaInfo setDescriptions(Set<LiteralValue> descriptions)
          Provide set of descriptions
 void setHash(long hash)
           
 MetaInfo setHasSources(Set<ResourceValue> hasSources)
           
 MetaInfo setIdentifiers(Set<LiteralValue> identifiers)
           
 MetaInfo setPublishers(Set<LiteralValue> publishers)
           
 MetaInfo setRights(Set<LiteralValue> rights)
           
 MetaInfo setSameAs(Set<ResourceValue> values)
           
 MetaInfo setSeeAlso(Set<ResourceValue> values)
           
 MetaInfo setSubjects(Set<LiteralValue> subjects)
           
 MetaInfo setTitles(Set<LiteralValue> values)
           
 void writeToStAX(XMLStreamWriter writer)
          Write the meta information in RDF/XML format using an XML Stream Writer.
 
Methods inherited from interface org.opentox.toxotis.core.IHTMLSupport
inHtml
 

Method Detail

getComments

Set<LiteralValue> getComments()
The property rdfs:comment is used to provide a human-readable description of a resource. Users can specify a set of such comments on a resource of interest.

Returns:
A comment on the described entity.

setComments

MetaInfo setComments(Set<LiteralValue> comments)
Setter for comments as a set.

Parameters:
comments - Comments for the resource
Returns:
The current modifiable MetaInfo object.

addComment

MetaInfo addComment(LiteralValue... comment)
Add comments to the current instance of MetaInfo

Parameters:
comment - Sequence of comments provided for this MetaInfo object as literal value objects.
Returns:
The current modifiable MetaInfo object.

addComment

MetaInfo addComment(String... comment)
Add comments to the current instance of MetaInfo

Parameters:
comment - Sequence of comments provided for this MetaInfo object as plain strings.
Returns:
The current modifiable MetaInfo object.

getRights

Set<LiteralValue> getRights()
Copyright notes for the underlying resource.

Returns:
Set of copyright notes for the underlying resource for which this meta-info element is composed.

setRights

MetaInfo setRights(Set<LiteralValue> rights)
Parameters:
rights -
Returns:

addRights

MetaInfo addRights(LiteralValue... rights)
Parameters:
rights -
Returns:

addRights

MetaInfo addRights(String... rights)
Parameters:
rights -
Returns:

getDescriptions

Set<LiteralValue> getDescriptions()
An account of the content of the resource. Description may include but is not limited to: an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content.

Returns:
Description as a typed value

setDescriptions

MetaInfo setDescriptions(Set<LiteralValue> descriptions)
Provide set of descriptions

Parameters:
descriptions - Set of descriptions as literal values
Returns:

addDescription

MetaInfo addDescription(LiteralValue... description)
Parameters:
description -
Returns:

addDescription

MetaInfo addDescription(String... description)
Parameters:
description -
Returns:

getIdentifiers

Set<LiteralValue> getIdentifiers()
Get the identifier (ID) of the described entity. An identifier is an unambiguous reference to the resource within a given context. Recommended best practice is to identify the resource by means of a string or number conforming to a formal identification system. Examples of formal identification systems include the Uniform Resource Identifier (URI) (including the Uniform Resource Locator (URL), the Digital Object Identifier (DOI) and the International Standard Book Number (ISBN).

Returns:
Identifier as a Typed Value
See Also:
http://dublincore.org/documents/usageguide/elements.shtml

setIdentifiers

MetaInfo setIdentifiers(Set<LiteralValue> identifiers)
Parameters:
identifiers -
Returns:

addIdentifier

MetaInfo addIdentifier(LiteralValue... identifier)
Parameters:
identifier -
Returns:

addIdentifier

MetaInfo addIdentifier(String... identifier)
Parameters:
identifier -
Returns:

getSameAs

Set<ResourceValue> getSameAs()
The built-in OWL property owl:sameAs links an individual to an individual (i.e. it is an object property). Such an owl:sameAs statement indicates that two URI references actually refer to the same thing: the individuals have the same "identity". For individuals such as "people" this notion is relatively easy to understand. For example, we could state that the following two URI references actually refer to the same person:
 <rdf:Description rdf:about="#William_Jefferson_Clinton">
 <owl:sameAs rdf:resource="#BillClinton"/>
 </rdf:Description>
 
The owl:sameAs statements are often used in defining mappings between ontologies. It is unrealistic to assume everybody will use the same name to refer to individuals. That would require some grand design, which is contrary to the spirit of the web.

Returns:
A link to a resource that resembles the described entity

setSameAs

MetaInfo setSameAs(Set<ResourceValue> values)
Parameters:
values -
Returns:

addSameAs

MetaInfo addSameAs(ResourceValue value)
Parameters:
value -
Returns:

getSeeAlso

Set<ResourceValue> getSeeAlso()
Related to the datatype ontological property rdfs:seeAlso. The property rdfs:seeAlso specifies a resource that might provide additional information about the subject resource. This property may be specialized using rdfs:subPropertyOf to more precisely indicate the nature of the information the object resource has about the subject resource. The object and the subject resources are constrained only to be instances of the class rdfs:Resource.

Returns:
A reference to some other entity as a typed value.

setSeeAlso

MetaInfo setSeeAlso(Set<ResourceValue> values)
Parameters:
values -
Returns:

addSeeAlso

MetaInfo addSeeAlso(ResourceValue value)
Parameters:
value -
Returns:

getTitles

Set<LiteralValue> getTitles()
Get the name given to the resource. Typically, a Title will be a name by which the resource is formally known.

Returns:
Tile as a Typed Value

setTitles

MetaInfo setTitles(Set<LiteralValue> values)
Parameters:
values -
Returns:

addTitle

MetaInfo addTitle(LiteralValue... value)
Parameters:
value -
Returns:

addTitle

MetaInfo addTitle(String... value)
Parameters:
value -
Returns:

getSubjects

Set<LiteralValue> getSubjects()
Get the topic of the content of the resource. Typically, a Subject will be expressed as keywords or key phrases or classification codes that describe the topic of the resource. Recommended best practice is to select a value from a controlled vocabulary or formal classification scheme.

Returns:
Subject as a typed value

setSubjects

MetaInfo setSubjects(Set<LiteralValue> subjects)
Parameters:
subjects -
Returns:

addSubject

MetaInfo addSubject(LiteralValue... subject)
Parameters:
subject -
Returns:

addSubject

MetaInfo addSubject(String... subject)
Parameters:
subject -
Returns:

getPublishers

Set<LiteralValue> getPublishers()
Returns:

setPublishers

MetaInfo setPublishers(Set<LiteralValue> publishers)
Parameters:
publishers -
Returns:

addPublisher

MetaInfo addPublisher(LiteralValue... publisher)
Parameters:
publisher -
Returns:

addPublisher

MetaInfo addPublisher(String... publisher)
Parameters:
publisher -
Returns:

getCreators

Set<LiteralValue> getCreators()
The creator is an entity primarily responsible for making the content of the resource. Examples of a Creator include a person, an organization, or a service. Typically the name of the Creator should be used to indicate the entity.

Returns:
Creator as a typed value

setCreators

MetaInfo setCreators(Set<LiteralValue> creators)
Parameters:
creators -
Returns:

addCreator

MetaInfo addCreator(LiteralValue... creator)
Parameters:
creator -
Returns:

addCreator

MetaInfo addCreator(String... creator)
Parameters:
creator -
Returns:

getHasSources

Set<ResourceValue> getHasSources()
Returns:

setHasSources

MetaInfo setHasSources(Set<ResourceValue> hasSources)
Parameters:
hasSources -
Returns:

addHasSource

MetaInfo addHasSource(ResourceValue hasSource)
Parameters:
hasSource -
Returns:

getContributors

Set<LiteralValue> getContributors()
Returns:

setContributors

MetaInfo setContributors(Set<LiteralValue> contributors)
Parameters:
contributors -
Returns:

addContributor

MetaInfo addContributor(LiteralValue... contributor)
Parameters:
contributor -
Returns:

addContributor

MetaInfo addContributor(String... contributor)
Parameters:
contributor -
Returns:

getAudiences

Set<LiteralValue> getAudiences()
Returns:

setAudiences

MetaInfo setAudiences(Set<LiteralValue> audiences)
Parameters:
audiences -
Returns:

addAudience

MetaInfo addAudience(LiteralValue... audience)
Parameters:
audience -
Returns:

addAudience

MetaInfo addAudience(String... audience)
Parameters:
audience -
Returns:

getDate

LiteralValue getDate()
Returns:

setDate

MetaInfo setDate(LiteralValue date)
Parameters:
date -
Returns:

attachTo

com.hp.hpl.jena.rdf.model.Resource attachTo(com.hp.hpl.jena.rdf.model.Resource resource,
                                            com.hp.hpl.jena.ontology.OntModel model)
Attaches the meta data to a given resource in an ontological model returning the updated resource. The provided ontological model is also updated with the meta data assigned to the given resource.

Parameters:
resource - A resource from an ontological model to which meta data are to be assigned. The resource provided as input to this method is updated according to the metadata and various statements are assigned to it concerning the non-null fields of the metadata object to which the method is applied.
model - The ontological model holding the individual provided in this method.
Returns:
The updated resource with the metadata.

writeToStAX

void writeToStAX(XMLStreamWriter writer)
                 throws XMLStreamException
Write the meta information in RDF/XML format using an XML Stream Writer. The data are written at the current position of the cursor of the writer. The method appends meta information about the underlying resource that is described in the RDF/XML document. Note that the writter should include at least the following namespaces before the invokation of this method:
 ot   : http://www.opentox.org/api/1.1#
 rdfs : http://www.w3.org/2000/01/rdf-schema#
 rdf  : http://www.w3.org/1999/02/22-rdf-syntax-ns#
 dc   : http://purl.org/dc/elements/1.1/
 
The following code can be used to declare the above namespaces:
 writer.writeNamespace("ot", OTClasses.NS);
 writer.writeNamespace("rdfs", RDFS.getURI());
 writer.writeNamespace("rdf", RDF.getURI());
 writer.writeNamespace("dc", DC.NS);
 writer.writeNamespace("owl", OWL.NS);
 
Additionally you can declare the above as a set of predixes:
 writer.setPrefix("ot", OTClasses.NS);
 writer.setPrefix("rdfs", RDFS.getURI());
 writer.setPrefix("rdf", RDF.getURI());
 writer.setPrefix("dc", DC.NS);
 writer.setPrefix("owl", OWL.NS);
 

Parameters:
writer - Writer used to write XML data to an Output Stream
Throws:
XMLStreamException - In case there the data that try to be written are not consisent. For example such an exception is thrown if you forget to close a non-empty element in the XML.

getHash

long getHash()
Returns:

setHash

void setHash(long hash)
Parameters:
hash -

isEmpty

boolean isEmpty()
Check whether the meta info object is empty.

Returns:
true if the MetaInfo object is empty and false otherwise.


Copyright © 2011-2012 OpenTox. All Rights Reserved.