org.codehaus.enunciate.main
Class TextArtifact

java.lang.Object
  extended by org.codehaus.enunciate.main.BaseArtifact
      extended by org.codehaus.enunciate.main.TextArtifact
All Implemented Interfaces:
java.lang.Comparable<Artifact>, Artifact

public class TextArtifact
extends BaseArtifact

An artifact that is some text.

Author:
Ryan Heaton

Constructor Summary
TextArtifact(java.lang.String module, java.lang.String id, java.lang.String text)
           
 
Method Summary
 void exportTo(java.io.File file, Enunciate enunciate)
          Exports its text to the specified file.
 long getSize()
          The size of the bytes of the text, UTF-8.
 java.lang.String getText()
          The text for this artifact.
 boolean isPublic()
          Whether this file artifact is public.
 void setPublic(boolean bundled)
          Whether this file artifact is public.
 
Methods inherited from class org.codehaus.enunciate.main.BaseArtifact
addAlias, addDependency, compareTo, getAliases, getDependencies, getId, getModule, setDependencies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextArtifact

public TextArtifact(java.lang.String module,
                    java.lang.String id,
                    java.lang.String text)
Method Detail

getText

public java.lang.String getText()
The text for this artifact.

Returns:
The text for this artifact.

exportTo

public void exportTo(java.io.File file,
                     Enunciate enunciate)
              throws java.io.IOException
Exports its text to the specified file.

Parameters:
file - The file to export the text to.
enunciate - The enunciate mechanism to use for utilities and properties as necessary.
Throws:
java.io.IOException - If an error occurs exporting it.

getSize

public long getSize()
The size of the bytes of the text, UTF-8.

Returns:
The size of the bytes of the text, UTF-8.

isPublic

public boolean isPublic()
Whether this file artifact is public.

Specified by:
isPublic in interface Artifact
Overrides:
isPublic in class BaseArtifact
Returns:
Whether this file artifact is public.

setPublic

public void setPublic(boolean bundled)
Whether this file artifact is public.

Parameters:
bundled - Whether this file artifact is public.