org.apache.chemistry.opencmis.server.impl.atompub
Class AtomDocumentBase

java.lang.Object
  extended by org.apache.chemistry.opencmis.server.impl.atompub.XMLDocumentBase
      extended by org.apache.chemistry.opencmis.server.impl.atompub.AtomDocumentBase
Direct Known Subclasses:
AtomEntry, AtomFeed, ServiceDocument

public abstract class AtomDocumentBase
extends XMLDocumentBase

Atom base class.


Field Summary
 
Fields inherited from class org.apache.chemistry.opencmis.server.impl.atompub.XMLDocumentBase
PREFIX_APP, PREFIX_ATOM, PREFIX_CMIS, PREFIX_RESTATOM, PREFIX_XSI
 
Constructor Summary
AtomDocumentBase()
           
 
Method Summary
 String formatDate(long millis)
          Formats a DateTime.
 String generateAtomId(String input)
          Generates a valid Atom id.
 void writeAclLink(String href)
           
 void writeAllowableActionsLink(String href)
           
 void writeAlternateLink(String href, String type, String kind, String title, BigInteger length)
           
 void writeAuthor(String author)
          Writes an Atom author tag.
 void writeCollection(String href, String collectionType, String text, String... accept)
          Writes an Atom collection.
 void writeCurrentVerionsLink(String href)
           
 void writeDescribedByLink(String href)
           
 void writeDownLink(String href, String type)
           
 void writeEditLink(String href)
           
 void writeEditMediaLink(String href, String type)
           
 void writeEnclosureLink(String href)
           
 void writeFirstLink(String href)
           
 void writeFolderTreeLink(String href)
           
 void writeId(String id)
          Writes an Atom id tag.
 void writeLastLink(String href)
           
 void writeLink(String rel, String href, String type, String id)
          Writes a link.
 void writeNextLink(String href)
           
 void writePathSegment(String pathSegment)
          Writes a CMIS pathSegment tag.
 void writePoliciesLink(String href)
           
 void writePreviousLink(String href)
           
 void writePublished(GregorianCalendar published)
          Writes an Atom published tag.
 void writePublished(long published)
          Writes an Atom published tag.
 void writeRelationshipsLink(String href)
           
 void writeRelationshipSourceLink(String href)
           
 void writeRelationshipTargetLink(String href)
           
 void writeRelativePathSegment(String relativePathSegment)
          Writes a CMIS relativePathSegment tag.
 void writeSelfLink(String href, String id)
           
 void writeServiceLink(String href, String repositoryId)
           
 void writeSimpleDate(String namespace, String name, GregorianCalendar value)
          Writes a simple date tag.
 void writeSimpleDate(String namespace, String name, long millis)
          Writes a simple date tag.
 void writeSimpleTag(String namespace, String name, String value)
          Writes a simple tag.
 void writeTitle(String title)
          Writes an Atom title tag.
 void writeTypeDownLink(String href, String type)
           
 void writeTypeUpLink(String href, String type)
           
 void writeUpdated(GregorianCalendar updated)
          Writes an Atom updated tag.
 void writeUpdated(long updated)
          Writes an Atom updated tag.
 void writeUpLink(String href, String type)
           
 void writeVersionHistoryLink(String href)
           
 void writeViaLink(String href)
           
 void writeWorkingCopyLink(String href)
           
 
Methods inherited from class org.apache.chemistry.opencmis.server.impl.atompub.XMLDocumentBase
endDocument, getWriter, setNamespaces, setWriter, startDocument, writeNamespace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomDocumentBase

public AtomDocumentBase()
Method Detail

formatDate

public String formatDate(long millis)
Formats a DateTime.


generateAtomId

public String generateAtomId(String input)
Generates a valid Atom id.


writeSimpleTag

public void writeSimpleTag(String namespace,
                           String name,
                           String value)
                    throws javax.xml.stream.XMLStreamException
Writes a simple tag.

Throws:
javax.xml.stream.XMLStreamException

writeSimpleDate

public void writeSimpleDate(String namespace,
                            String name,
                            GregorianCalendar value)
                     throws javax.xml.stream.XMLStreamException
Writes a simple date tag.

Throws:
javax.xml.stream.XMLStreamException

writeSimpleDate

public void writeSimpleDate(String namespace,
                            String name,
                            long millis)
                     throws javax.xml.stream.XMLStreamException
Writes a simple date tag.

Throws:
javax.xml.stream.XMLStreamException

writeId

public void writeId(String id)
             throws javax.xml.stream.XMLStreamException
Writes an Atom id tag.

Throws:
javax.xml.stream.XMLStreamException

writeTitle

public void writeTitle(String title)
                throws javax.xml.stream.XMLStreamException
Writes an Atom title tag.

Throws:
javax.xml.stream.XMLStreamException

writeAuthor

public void writeAuthor(String author)
                 throws javax.xml.stream.XMLStreamException
Writes an Atom author tag.

Throws:
javax.xml.stream.XMLStreamException

writeUpdated

public void writeUpdated(GregorianCalendar updated)
                  throws javax.xml.stream.XMLStreamException
Writes an Atom updated tag.

Throws:
javax.xml.stream.XMLStreamException

writeUpdated

public void writeUpdated(long updated)
                  throws javax.xml.stream.XMLStreamException
Writes an Atom updated tag.

Throws:
javax.xml.stream.XMLStreamException

writePublished

public void writePublished(GregorianCalendar published)
                    throws javax.xml.stream.XMLStreamException
Writes an Atom published tag.

Throws:
javax.xml.stream.XMLStreamException

writePublished

public void writePublished(long published)
                    throws javax.xml.stream.XMLStreamException
Writes an Atom published tag.

Throws:
javax.xml.stream.XMLStreamException

writePathSegment

public void writePathSegment(String pathSegment)
                      throws javax.xml.stream.XMLStreamException
Writes a CMIS pathSegment tag.

Throws:
javax.xml.stream.XMLStreamException

writeRelativePathSegment

public void writeRelativePathSegment(String relativePathSegment)
                              throws javax.xml.stream.XMLStreamException
Writes a CMIS relativePathSegment tag.

Throws:
javax.xml.stream.XMLStreamException

writeCollection

public void writeCollection(String href,
                            String collectionType,
                            String text,
                            String... accept)
                     throws javax.xml.stream.XMLStreamException
Writes an Atom collection.

Throws:
javax.xml.stream.XMLStreamException

writeLink

public void writeLink(String rel,
                      String href,
                      String type,
                      String id)
               throws javax.xml.stream.XMLStreamException
Writes a link.

Throws:
javax.xml.stream.XMLStreamException

writeServiceLink

public void writeServiceLink(String href,
                             String repositoryId)
                      throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeSelfLink

public void writeSelfLink(String href,
                          String id)
                   throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeEnclosureLink

public void writeEnclosureLink(String href)
                        throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeEditLink

public void writeEditLink(String href)
                   throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeAlternateLink

public void writeAlternateLink(String href,
                               String type,
                               String kind,
                               String title,
                               BigInteger length)
                        throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeWorkingCopyLink

public void writeWorkingCopyLink(String href)
                          throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeUpLink

public void writeUpLink(String href,
                        String type)
                 throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeDownLink

public void writeDownLink(String href,
                          String type)
                   throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeVersionHistoryLink

public void writeVersionHistoryLink(String href)
                             throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeCurrentVerionsLink

public void writeCurrentVerionsLink(String href)
                             throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeEditMediaLink

public void writeEditMediaLink(String href,
                               String type)
                        throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeDescribedByLink

public void writeDescribedByLink(String href)
                          throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeAllowableActionsLink

public void writeAllowableActionsLink(String href)
                               throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeAclLink

public void writeAclLink(String href)
                  throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writePoliciesLink

public void writePoliciesLink(String href)
                       throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeRelationshipsLink

public void writeRelationshipsLink(String href)
                            throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeRelationshipSourceLink

public void writeRelationshipSourceLink(String href)
                                 throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeRelationshipTargetLink

public void writeRelationshipTargetLink(String href)
                                 throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeFolderTreeLink

public void writeFolderTreeLink(String href)
                         throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeTypeUpLink

public void writeTypeUpLink(String href,
                            String type)
                     throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeTypeDownLink

public void writeTypeDownLink(String href,
                              String type)
                       throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeViaLink

public void writeViaLink(String href)
                  throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeFirstLink

public void writeFirstLink(String href)
                    throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeLastLink

public void writeLastLink(String href)
                   throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writePreviousLink

public void writePreviousLink(String href)
                       throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeNextLink

public void writeNextLink(String href)
                   throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.