|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.node.policy.PolicyParser
public class PolicyParser
This class is a parser for XML Execution Policy documents.
| Constructor Summary | |
|---|---|
PolicyParser()
Initialize this parser. |
|
| Method Summary | |
|---|---|
static void |
main(String... args)
Test of the parser. |
PolicyDescriptor |
parse(Reader reader)
Parse an XML document in a reader into a tree of option descriptors. |
PolicyDescriptor |
parse(String docPath)
Parse an XML document in a file into a tree of option descriptors. |
static ExecutionPolicy |
parsePolicy(File policyFile)
Parse an XML document representing an execution policy from a file path. |
static ExecutionPolicy |
parsePolicy(InputStream stream)
Parse an XML document representing an execution policy from an input stream. |
static ExecutionPolicy |
parsePolicy(Reader reader)
Parse an XML document representing an execution policy from a reader. |
static ExecutionPolicy |
parsePolicy(String policyContent)
Parse an XML document representing an execution policy. |
static ExecutionPolicy |
parsePolicyFile(String docPath)
Parse an XML document representing an execution policy from a file path. |
static void |
validatePolicy(File docPath)
Validate an XML document representing an execution policy against the JPPF Execution Policy schema. |
static void |
validatePolicy(InputStream stream)
Validate an XML document representing an execution policy against the JPPF Execution Policy schema. |
static void |
validatePolicy(Reader reader)
Validate an XML document representing an execution policy against the JPPF Execution Policy schema. |
static void |
validatePolicy(String policyContent)
Validate an XML document representing an execution policy against the JPPF Execution Policy schema. |
static void |
validatePolicyFile(String docPath)
Validate an XML document representing an execution policy against the JPPF Execution Policy schema. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PolicyParser()
throws Exception
Exception - if the DOM parser could not be initialized.| Method Detail |
|---|
public PolicyDescriptor parse(String docPath)
throws Exception
docPath - the path to XML document to parse.
OptionDescriptor instance, root of the generated tree,
or null if the docuement could not be parsed.
Exception - if an error occurs while parsing the document.
public PolicyDescriptor parse(Reader reader)
throws Exception
reader - the reader providing the XML document.
OptionDescriptor instance, root of the generated tree,
or null if the docuement could not be parsed.
Exception - if an error occurs while parsing the document.public static void main(String... args)
args - not used.
public static ExecutionPolicy parsePolicy(String policyContent)
throws Exception
policyContent - an XML string containing the policy.
ExecutionPolicy instance.
Exception - if an error occurs during the validation or parsing.
public static ExecutionPolicy parsePolicyFile(String docPath)
throws Exception
docPath - path to the XML document file.
ExecutionPolicy instance.
Exception - if an error occurs during the validation or parsing.
public static ExecutionPolicy parsePolicy(File policyFile)
throws Exception
policyFile - abstract path of the XML document file.
ExecutionPolicy instance.
Exception - if an error occurs during the validation or parsing.
public static ExecutionPolicy parsePolicy(InputStream stream)
throws Exception
stream - an input stream from which the XML representation of the policy is read.
ExecutionPolicy instance.
Exception - if an error occurs during the validation or parsing.
public static ExecutionPolicy parsePolicy(Reader reader)
throws Exception
reader - reader from which the XML representation of the policy is read.
ExecutionPolicy instance.
Exception - if an error occurs during the validation or parsing.
public static void validatePolicy(String policyContent)
throws JPPFException,
Exception
policyContent - the XML content of the policy document.
JPPFException - if there is a validation error. The details of the errors are included in the exception message.
Exception - if an error occurs during the validation.
public static void validatePolicyFile(String docPath)
throws JPPFException,
Exception
docPath - path to the XML document file.
JPPFException - if there is a validation error. The details of the errors are included in the exception message.
Exception - if an error occurs during the validation.
public static void validatePolicy(File docPath)
throws JPPFException,
Exception
docPath - abstract path of the XML document file.
JPPFException - if there is a validation error. The details of the errors are included in the exception message.
Exception - if an error occurs during the validation.
public static void validatePolicy(InputStream stream)
throws JPPFException,
Exception
stream - an input stream from which the XML representation of the policy is read.
JPPFException - if there is a validation error. The details of the errors are included in the exception message.
Exception - if an error occurs during the validation or parsing.
public static void validatePolicy(Reader reader)
throws JPPFException,
Exception
reader - reader from which the XML representation of the policy is read.
JPPFException - if there is a validation error. The details of the errors are included in the exception message.
Exception - if an error occurs during the validation or parsing.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||