Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.wymiwyg.mies.client.common
Class Server  view Server download Server.java

java.lang.Object
  extended byorg.wymiwyg.mies.client.common.Server

public class Server
extends java.lang.Object

This class provides methods to access the functionality of the mies-server


Field Summary
private static org.apache.log4j.Logger logger
           
(package private)  ServerSettings serverSettings
           
 
Constructor Summary
Server(ServerSettings serverSettings)
           
 
Method Summary
 void addAnnotation(Annotation annotation)
          either the bodyContent or the body must be null or an empty string
private  void addAuthorization(java.net.HttpURLConnection connection)
          Method addAuthorization.
 void addHost(Host host)
          add a trusted host
private  Resource createHttpResource(Model model, java.lang.String title, java.lang.String content)
           
private  java.lang.String createSimpleHtml(java.lang.String title, java.lang.String content)
           
 void deleteHost(org.wymiwyg.mies.compatibility.java.net.URI uri)
           
 Annotation[] getAnnotatedBy(org.wymiwyg.mies.compatibility.java.net.URI uri)
           
private  Annotation[] getAnnotationFromRDF(java.io.Reader rdfReader)
          Gets annotations from an rdf character Stream an closes the Stream
 AnnotationIterator getAnnotationIterator(org.wymiwyg.mies.compatibility.java.net.URI uri)
          the difference to getAnnotations is that this method support multipart answers.
 Annotation[] getAnnotations(org.wymiwyg.mies.compatibility.java.net.URI uri)
           
private  java.net.URL getAnnotationsRequestURL(org.wymiwyg.mies.compatibility.java.net.URI uri)
           
 java.net.HttpURLConnection getBody(java.net.URL url)
          returns a HttpURLConnection connected to the server, this is used for proxing the body to the user-agent
 Category getCategory(org.wymiwyg.mies.compatibility.java.net.URI category)
           
 Host getHost(org.wymiwyg.mies.compatibility.java.net.URI uri)
           
 Host[] getHosts()
           
private  Host[] getHostsFromRDF(java.io.Reader rdfReader)
          Gets annotations from an rdf character Stream an closes the Stream
private  void postData(java.lang.String outString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Logger logger

serverSettings

ServerSettings serverSettings
Constructor Detail

Server

public Server(ServerSettings serverSettings)
Method Detail

addAnnotation

public void addAnnotation(Annotation annotation)
either the bodyContent or the body must be null or an empty string


addAuthorization

private void addAuthorization(java.net.HttpURLConnection connection)
                       throws java.io.IOException
Method addAuthorization.


addHost

public void addHost(Host host)
add a trusted host


createHttpResource

private Resource createHttpResource(Model model,
                                    java.lang.String title,
                                    java.lang.String content)
                             throws RDFException

createSimpleHtml

private java.lang.String createSimpleHtml(java.lang.String title,
                                          java.lang.String content)

deleteHost

public void deleteHost(org.wymiwyg.mies.compatibility.java.net.URI uri)

getAnnotatedBy

public Annotation[] getAnnotatedBy(org.wymiwyg.mies.compatibility.java.net.URI uri)
                            throws java.io.IOException

getAnnotationFromRDF

private Annotation[] getAnnotationFromRDF(java.io.Reader rdfReader)
                                   throws java.io.IOException
Gets annotations from an rdf character Stream an closes the Stream


getHostsFromRDF

private Host[] getHostsFromRDF(java.io.Reader rdfReader)
                        throws java.io.IOException
Gets annotations from an rdf character Stream an closes the Stream


getAnnotationIterator

public AnnotationIterator getAnnotationIterator(org.wymiwyg.mies.compatibility.java.net.URI uri)
                                         throws java.io.IOException
the difference to getAnnotations is that this method support multipart answers.


getAnnotations

public Annotation[] getAnnotations(org.wymiwyg.mies.compatibility.java.net.URI uri)
                            throws java.io.IOException

getHost

public Host getHost(org.wymiwyg.mies.compatibility.java.net.URI uri)
             throws java.io.IOException

getHosts

public Host[] getHosts()
                throws java.io.IOException

getAnnotationsRequestURL

private java.net.URL getAnnotationsRequestURL(org.wymiwyg.mies.compatibility.java.net.URI uri)
                                       throws java.net.MalformedURLException

getBody

public java.net.HttpURLConnection getBody(java.net.URL url)
                                   throws java.io.IOException
returns a HttpURLConnection connected to the server, this is used for proxing the body to the user-agent


getCategory

public Category getCategory(org.wymiwyg.mies.compatibility.java.net.URI category)
                     throws java.io.IOException

postData

private void postData(java.lang.String outString)
               throws java.io.IOException