Class EuGridPmaNamespacesParser
- java.lang.Object
-
- eu.emi.security.authn.x509.helpers.ns.EuGridPmaNamespacesParser
-
- All Implemented Interfaces:
NamespacesParser
public class EuGridPmaNamespacesParser extends java.lang.Object implements NamespacesParser
Parses a single EUGridPMA namespaces file and returnsNamespacePolicyobject. The syntax is defined in the document (available from the EUGridPMA website): eugridpma-namespaces-format-spec-20060113-0-1-4.doc, Mon, 16 January 2006. This class is not thread safe.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringfilePathprivate java.lang.Stringhashprivate java.lang.Stringissuerstatic java.lang.StringNS_REGEXPprivate booleanopenssl1Modeprivate booleanpermitprivate java.lang.Stringsubjectprivate static java.lang.StringSUPPORTED_VERSIONprivate static java.lang.StringVERSION_KEY
-
Constructor Summary
Constructors Constructor Description EuGridPmaNamespacesParser(java.lang.String filePath, boolean openssl1Mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intconsumeQuoted(char[] chars, int offset, java.lang.StringBuilder ret)private inteatSpaces(char[] string, int offset, boolean atLeastOne)protected voidhandleEntry(java.lang.String line)java.util.List<NamespacePolicy>parse()protected java.lang.StringstripComments(java.lang.String from)
-
-
-
Field Detail
-
VERSION_KEY
private static final java.lang.String VERSION_KEY
- See Also:
- Constant Field Values
-
NS_REGEXP
public static final java.lang.String NS_REGEXP
- See Also:
- Constant Field Values
-
SUPPORTED_VERSION
private static final java.lang.String SUPPORTED_VERSION
- See Also:
- Constant Field Values
-
filePath
private java.lang.String filePath
-
hash
private java.lang.String hash
-
issuer
private java.lang.String issuer
-
subject
private java.lang.String subject
-
permit
private boolean permit
-
openssl1Mode
private boolean openssl1Mode
-
-
Method Detail
-
parse
public java.util.List<NamespacePolicy> parse() throws java.io.IOException
- Specified by:
parsein interfaceNamespacesParser- Throws:
java.io.IOException
-
stripComments
protected java.lang.String stripComments(java.lang.String from) throws java.io.IOException- Throws:
java.io.IOException
-
handleEntry
protected void handleEntry(java.lang.String line) throws java.io.IOException- Throws:
java.io.IOException
-
consumeQuoted
protected int consumeQuoted(char[] chars, int offset, java.lang.StringBuilder ret) throws java.io.IOException- Throws:
java.io.IOException
-
eatSpaces
private int eatSpaces(char[] string, int offset, boolean atLeastOne) throws java.io.IOException- Throws:
java.io.IOException
-
-