dk.brics.relaxng
Class SingleContentPattern

java.lang.Object
  extended by dk.brics.relaxng.Pattern
      extended by dk.brics.relaxng.SingleContentPattern
Direct Known Subclasses:
AttributePattern, DataPattern, ElementPattern, ListPattern, OneOrMorePattern, OptionalPattern

public abstract class SingleContentPattern
extends Pattern

Abstract superclass for patterns with a single (or no) content.


Field Summary
protected  Pattern p
          Content pattern.
 
Fields inherited from class dk.brics.relaxng.Pattern
origin
 
Constructor Summary
SingleContentPattern(Pattern p, Origin origin)
          Constructs a new pattern with a single content.
 
Method Summary
 Pattern getContent()
          Returns the content pattern.
 boolean hasContent()
          Checks whether this pattern has a content.
 void setContent(Pattern p)
          Sets the content.
 
Methods inherited from class dk.brics.relaxng.Pattern
getOrigin, process, setOrigin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

protected Pattern p
Content pattern.

Constructor Detail

SingleContentPattern

public SingleContentPattern(Pattern p,
                            Origin origin)
Constructs a new pattern with a single content.

Parameters:
p - content pattern, null if none
origin - source information (null if not applicable)
Method Detail

getContent

public Pattern getContent()
Returns the content pattern.

Returns:
content pattern, null if none

hasContent

public boolean hasContent()
Checks whether this pattern has a content.

Returns:
true if content is present

setContent

public void setContent(Pattern p)
Sets the content.

Parameters:
p - content pattern, null if none


Copyright © 2005-2010 Anders Møller.