public class XMLResource extends java.lang.Object implements ParagraphElement, ElementReference, NonEmptyLineAscendant
wiki ==> doc-files ====> reference1.html ==>article1.xml ==>subDirectory ====> doc-files ======> reference2.html ====>article2.xmlThe "article1.xml" article can reference the "reference1.html" in the top-level "doc-files" directory, whereas the "article2.xml" article can reference the "reference2.html" in the sub-level "doc-files" directory. The syntax is:
<resource href="reference1.html">the reference</resource>
TYPE_NONE
Constructor and Description |
---|
XMLResource(XMLArticle article)
Constructor.
|
XMLResource(XMLArticle article,
java.lang.String id,
java.lang.String pack)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(org.docgene.model.globals.ResourceDefinition resource)
Bind this resource to its associated resource definition.
|
void |
bind(java.lang.String path)
Set the resource path.
|
XMLArticle |
getArticle()
Return the article in which this resource reference is used.
|
java.lang.String |
getDeclaration()
Return the declaration ID of the element.
|
java.lang.String |
getID()
Return the referenced resource ID.
|
java.io.File |
getInputFile()
Return the input File for the resource.
|
int |
getLineNumber()
Return the line where the reference appear.
|
java.lang.String |
getOutputPath()
Return the resource output path.
|
java.lang.String |
getPackage()
Return the resource reference package.
|
java.lang.String |
getPath()
Return the resource path.
|
org.docgene.model.globals.ResourceDefinition |
getResource()
Return the associated resource definition.
|
java.lang.String |
getText()
Return the resource text.
|
boolean |
hasID()
Return true if this resource reference an resource ID
|
boolean |
hasResourceDefinition()
Return true if this resource references a resource definition
|
void |
setLineNumber(int lineNumber)
Set the line number where the reference appear.
|
void |
setOutputPath(java.lang.String path)
Set the resource output path.
|
void |
setText(java.lang.String text)
Set the resource text.
|
java.lang.String |
toString()
Return the resource path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCustomStyles, getInlinedStyle, getStyle, hasInlinedStyle, setCustomStyles, setCustomStyles, setInlinedStyle
hasLineNumber
public XMLResource(XMLArticle article)
article
- the articlepublic XMLResource(XMLArticle article, java.lang.String id, java.lang.String pack)
article
- the articleid
- the reference IDpack
- the packagepublic void setLineNumber(int lineNumber)
lineNumber
- the line numberpublic int getLineNumber()
getLineNumber
in interface ElementReference
public java.lang.String getDeclaration()
getDeclaration
in interface StyledElement
public XMLArticle getArticle()
public void bind(org.docgene.model.globals.ResourceDefinition resource)
resource
- the resource definitionpublic org.docgene.model.globals.ResourceDefinition getResource()
public boolean hasResourceDefinition()
public java.io.File getInputFile()
public java.lang.String getID()
public java.lang.String getPackage()
public boolean hasID()
public void setText(java.lang.String text)
text
- the resource textpublic java.lang.String getPath()
public java.lang.String getOutputPath()
public java.lang.String getText()
public void bind(java.lang.String path)
path
- the resource pathpublic void setOutputPath(java.lang.String path)
path
- the resource output pathpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence