de.fuberlin.wiwiss.ng4j.swp.impl
Class SWPAuthorityImpl

java.lang.Object
  extended by de.fuberlin.wiwiss.ng4j.swp.impl.SWPAuthorityImpl
All Implemented Interfaces:
SWPAuthority

public class SWPAuthorityImpl
extends Object
implements SWPAuthority

An SWPAuthority represents information about an authorty like id, label, eMail, keys and certificates

Author:
chris bizer

Constructor Summary
SWPAuthorityImpl()
           
SWPAuthorityImpl(Node id)
           
 
Method Summary
 boolean addDescriptionToGraph(NamedGraph graph, ArrayList listOfAuthorityProperties)
          Adds a description of the authority to a graph.
 void addProperty(Node predicate, Node object)
          Adds an additional property of the authority.
 X509Certificate getCertificate()
           
 String getEmail()
           
 Graph getGraph()
          Returns a graph containing all information about the authority.
 Node getID()
           
 String getLabel()
           
 ExtendedIterator getProperty(Node predicate)
          Returns an iterator over all property values (nodes) for a given property.
 PublicKey getPublicKey()
           
 void setCertificate(X509Certificate certificate)
          Sets the certificate of the authority.
 void setEmail(String email)
          Sets the eMail address of the authority.
 void setID(Node id)
          Sets the ID of the authority.
 void setLabel(String label)
          Sets the Label / Name of the authority.
 void setPublicKey(PublicKey key)
          Sets the public key of the authority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWPAuthorityImpl

public SWPAuthorityImpl()

SWPAuthorityImpl

public SWPAuthorityImpl(Node id)
Parameters:
id -
Method Detail

setID

public void setID(Node id)
Sets the ID of the authority. Authorities can by identified using a URIref or a bNode

Specified by:
setID in interface SWPAuthority
Parameters:
id -

getID

public Node getID()
Specified by:
getID in interface SWPAuthority
Returns:
id

setLabel

public void setLabel(String label)
Sets the Label / Name of the authority. Will be serialized using rdfs:label

Specified by:
setLabel in interface SWPAuthority
Parameters:
label -

getLabel

public String getLabel()
Specified by:
getLabel in interface SWPAuthority
Returns:
label

setEmail

public void setEmail(String email)
Sets the eMail address of the authority. Will be serialized using foaf:mbox

Specified by:
setEmail in interface SWPAuthority
Parameters:
email -

getEmail

public String getEmail()
Specified by:
getEmail in interface SWPAuthority
Returns:
email

setPublicKey

public void setPublicKey(PublicKey key)
Sets the public key of the authority. Will be serialized using swp:hasKey

Specified by:
setPublicKey in interface SWPAuthority
Parameters:
key -

getPublicKey

public PublicKey getPublicKey()
Specified by:
getPublicKey in interface SWPAuthority
Returns:
publickey

setCertificate

public void setCertificate(X509Certificate certificate)
Sets the certificate of the authority.

Specified by:
setCertificate in interface SWPAuthority
Parameters:
certificate -

getCertificate

public X509Certificate getCertificate()
Specified by:
getCertificate in interface SWPAuthority
Returns:
certificate

addProperty

public void addProperty(Node predicate,
                        Node object)
Adds an additional property of the authority.

Specified by:
addProperty in interface SWPAuthority
Parameters:
predicate -
object -

getProperty

public ExtendedIterator getProperty(Node predicate)
Returns an iterator over all property values (nodes) for a given property.

Specified by:
getProperty in interface SWPAuthority
Returns:
predicate

addDescriptionToGraph

public boolean addDescriptionToGraph(NamedGraph graph,
                                     ArrayList listOfAuthorityProperties)
Adds a description of the authority to a graph. The listOfAuthorityProperties determines which information about the authority is added.

Specified by:
addDescriptionToGraph in interface SWPAuthority
Parameters:
graph -
listOfAuthorityProperties -
Returns:
boolean
Throws:
SWPMissingAuthorityPropertyException

getGraph

public Graph getGraph()
Returns a graph containing all information about the authority.

Specified by:
getGraph in interface SWPAuthority
Returns:
graph