Class NodeTypeReader
- java.lang.Object
-
- org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader
-
public class NodeTypeReader extends Object
Node type definition reader. This class is used to read the persistent node type definition files used by Jackrabbit.
-
-
Constructor Summary
Constructors Constructor Description NodeTypeReader(InputStream xml)
Creates a node type definition file reader.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Properties
getNamespaces()
Returns the namespaces declared in the node type definition file.QNodeTypeDefinition[]
getNodeTypeDefs()
Returns all node type definitions specified by node type elements under the current element.static QNodeTypeDefinition[]
read(InputStream xml)
Reads a node type definition file.
-
-
-
Constructor Detail
-
NodeTypeReader
public NodeTypeReader(InputStream xml) throws IOException
Creates a node type definition file reader.- Parameters:
xml
- node type definition file- Throws:
IOException
- if the node type definition file cannot be read
-
-
Method Detail
-
read
public static QNodeTypeDefinition[] read(InputStream xml) throws IOException, InvalidNodeTypeDefException
Reads a node type definition file. The file contents are read from the given input stream and the parsed node type definitions are returned.- Parameters:
xml
- XML input stream- Returns:
- node type definitions
- Throws:
IOException
- if the node type definitions cannot be readInvalidNodeTypeDefException
- if the node type definition format is invalid
-
getNamespaces
public Properties getNamespaces()
Returns the namespaces declared in the node type definition file.- Returns:
- the namespaces
-
getNodeTypeDefs
public QNodeTypeDefinition[] getNodeTypeDefs() throws InvalidNodeTypeDefException, NameException, NamespaceException
Returns all node type definitions specified by node type elements under the current element.- Returns:
- node type definitions
- Throws:
InvalidNodeTypeDefException
- if a definition is invalidNameException
- if a definition contains an illegal nameNamespaceException
- if a namespace is not defined
-
-