org.openanzo.atom.atomowl
Class AtomOWLUtils

java.lang.Object
  extended by org.openanzo.atom.atomowl.AtomOWLUtils
All Implemented Interfaces:
AtomConstants

public class AtomOWLUtils
extends java.lang.Object
implements AtomConstants


Field Summary
 
Fields inherited from interface org.openanzo.atom.AtomConstants
ANCHOR, ATOM_SERVER_NAME, ATOM_SERVER_VERSION, BINARY_CONTENT_SRC, BINARY_CONTENT_TYPE, BINARY_CONTENT_VERSION, CLIENT_DOJO, COLLECTION_PAGE_SIZE, CONTENT_ATOM_XML, CONTENT_ATOM_XML_UTF8, CONTENT_ATOMSERV_XML, CONTENT_ATOMSERV_XML_UTF8, CONTENT_HTML, CONTENT_JSON, CONTENT_MULTIPART_FORM_DATA, CONTENT_RDF_XML, CONTENT_TEXT, CONTENT_XHTML, CONTENT_XHTML_SHORT, CONTENT_XML, DELIM, EDIT, ENTRY, HEADER_ACCEPT, HEADER_ALLOW, HEADER_CONTENT_LOCATION, HEADER_CONTENT_TYPE, HEADER_ETAG, HEADER_LOCATION, HEADER_TITLE, HISTORY, HTTP_BAD_REQUEST, HTTP_CONFLICT, HTTP_CREATED, HTTP_FORBIDDEN, HTTP_GONE, HTTP_INTERNAL_SERVER_ERROR, HTTP_METHOD_NOT_ALLOWED, HTTP_NOT_AUTHORIZED, HTTP_NOT_FOUND, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_UNSUPPORTED_MEDIA, INVALID_ATOM_ENTRY, INVALID_COLLECTION_URI, LINK_REL_ALTERNATE, LINK_REL_ANCHOR, LINK_REL_COLLECTION, LINK_REL_CONTENT_GRAPH, LINK_REL_EDIT, LINK_REL_EDIT_MEDIA, LINK_REL_FIRST, LINK_REL_HISTORY, LINK_REL_INTROSPECTION, LINK_REL_LAST, LINK_REL_NEXT, LINK_REL_PREVIOUS, LINK_REL_RELATED, LINK_REL_SELF, MEDIA, NS_QUESO, NS_XHTML, PREFIX_QUESO, QUESO_NS, REQUEST_PARAMETER_ACCEPT, REQUEST_PARAMETER_CLIENT, REQUEST_PARAMETER_COLLECTION_URI, SPECIAL_RESOURCE_THISENTRY, SPECIAL_RESOURCE_TIMESTAMP, UNKNOWN_SERVER_ERROR, X_OVERRIDE_HEADER, X_STATUS_HEADER, XSD_ANYURI, XSD_INT, XSD_STRING
 
Constructor Summary
AtomOWLUtils()
           
 
Method Summary
static java.lang.String elementToString(org.apache.abdera.model.Element element)
           
static java.lang.String extractContentTypeFromContent(org.apache.abdera.model.Entry entry)
          Returns either "xhtml","html","text" or a proper mime type (i.e.
static java.lang.String extractHttpMimeTypeFromContent(org.apache.abdera.model.Entry entry)
          Returns the proper mime type to send back with the HTTP request
static java.net.URI getAlternateURL(java.net.URI baseURI, java.lang.String entryId)
           
static java.net.URI getBaseURI(javax.servlet.http.HttpServletRequest request)
           
static java.net.URI getCollectionURL(java.net.URI baseURI, java.lang.String colName)
           
static java.net.URI getEditURL(java.net.URI baseURI, java.lang.String entryId)
           
static java.net.URI getEditURL(java.net.URI baseURI, java.lang.String entryId, long revision)
           
static javax.activation.MimeType getMimeType(java.lang.String mimeType)
           
static java.net.URI getRevisionHistoryFeedURL(java.net.URI baseURI, java.lang.String entryId, java.lang.String collectionPage)
           
static boolean isRDF(org.apache.abdera.model.Entry entry)
           
static boolean isXML(org.apache.abdera.model.Entry entry)
           
static java.lang.String join(java.lang.String[] components)
           
static java.lang.String join(java.lang.String[] components, java.lang.String separator)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomOWLUtils

public AtomOWLUtils()
Method Detail

extractContentTypeFromContent

public static java.lang.String extractContentTypeFromContent(org.apache.abdera.model.Entry entry)
Returns either "xhtml","html","text" or a proper mime type (i.e. application/xml)

Parameters:
entry -
Returns:

isXML

public static boolean isXML(org.apache.abdera.model.Entry entry)

isRDF

public static boolean isRDF(org.apache.abdera.model.Entry entry)

extractHttpMimeTypeFromContent

public static java.lang.String extractHttpMimeTypeFromContent(org.apache.abdera.model.Entry entry)
Returns the proper mime type to send back with the HTTP request

Parameters:
entry -
Returns:

join

public static java.lang.String join(java.lang.String[] components)

join

public static java.lang.String join(java.lang.String[] components,
                                    java.lang.String separator)

getEditURL

public static java.net.URI getEditURL(java.net.URI baseURI,
                                      java.lang.String entryId,
                                      long revision)

getEditURL

public static java.net.URI getEditURL(java.net.URI baseURI,
                                      java.lang.String entryId)

getAlternateURL

public static java.net.URI getAlternateURL(java.net.URI baseURI,
                                           java.lang.String entryId)

getCollectionURL

public static java.net.URI getCollectionURL(java.net.URI baseURI,
                                            java.lang.String colName)

getRevisionHistoryFeedURL

public static java.net.URI getRevisionHistoryFeedURL(java.net.URI baseURI,
                                                     java.lang.String entryId,
                                                     java.lang.String collectionPage)

elementToString

public static java.lang.String elementToString(org.apache.abdera.model.Element element)
                                        throws java.io.IOException
Throws:
java.io.IOException

getMimeType

public static javax.activation.MimeType getMimeType(java.lang.String mimeType)

getBaseURI

public static java.net.URI getBaseURI(javax.servlet.http.HttpServletRequest request)
                               throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.