Package org.apache.any23.extractor.rdfa
Class RDFa11Parser
- java.lang.Object
-
- org.apache.any23.extractor.rdfa.RDFa11Parser
-
@Deprecated public class RDFa11Parser extends Object
Deprecated.since 2.3 theRio
implementations are used to parse RDFa. Look atRDFParserFactory.getRDFa10Parser(boolean, boolean, org.apache.any23.extractor.ExtractionContext, org.apache.any23.extractor.ExtractionResult)
andRDFParserFactory.getRDFa11Parser(boolean, boolean, org.apache.any23.extractor.ExtractionContext, org.apache.any23.extractor.ExtractionResult)
.- Author:
- Michele Mostarda (mostarda@fbk.eu)
-
-
Field Summary
Fields Modifier and Type Field Description static String
ABOUT_ATTRIBUTE
Deprecated.static String
ATTRIBUTE_CSS
Deprecated.static String
BODY_TAG
Deprecated.static String
CONTENT_ATTRIBUTE
Deprecated.static String
CURIE_SEPARATOR
Deprecated.static String
DATATYPE_ATTRIBUTE
Deprecated.static String
HEAD_TAG
Deprecated.static String
HREF_ATTRIBUTE
Deprecated.static String
IRI_PATH_SEPARATOR
Deprecated.static char
IRI_PREFIX_SEPARATOR
Deprecated.static String
IRI_SCHEMA_SEPARATOR
Deprecated.static String
PREFIX_ATTRIBUTE
Deprecated.static String
PROFILE_ATTRIBUTE
Deprecated.static String
PROPERTY_ATTRIBUTE
Deprecated.static String
REL_ATTRIBUTE
Deprecated.static String
RESOURCE_ATTRIBUTE
Deprecated.static String
REV_ATTRIBUTE
Deprecated.static String
SRC_ATTRIBUTE
Deprecated.static String[]
SUBJECT_ATTRIBUTES
Deprecated.static String
TYPE_ATTRIBUTE
Deprecated.static String
TYPEOF_ATTRIBUTE
Deprecated.static String
VOCAB_ATTRIBUTE
Deprecated.static String
XML_LANG_ATTRIBUTE
Deprecated.static String
XML_LITERAL_DATATYPE
Deprecated.static String
XMLNS_ATTRIBUTE
Deprecated.static String
XMLNS_DEFAULT
Deprecated.
-
Constructor Summary
Constructors Constructor Description RDFa11Parser()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected static String[]
extractPrefixSections(String prefixesDeclaration)
Deprecated.Given a prefix declaration returns a list ofprefixID:prefixURL
strings normalizing blanks where present.protected static org.eclipse.rdf4j.model.Literal
getAsPlainLiteral(Node node, String currentLanguage)
Deprecated.protected static org.eclipse.rdf4j.model.Literal
getAsXMLLiteral(Node node)
Deprecated.protected static URL
getDocumentBase(URL documentURL, Document document)
Deprecated.protected org.eclipse.rdf4j.model.IRI
getMapping(String prefix)
Deprecated.Returns a IRI mapping for a given prefix.protected static boolean
isAbsoluteIRI(String iri)
Deprecated.protected static boolean
isCURIE(String curie)
Deprecated.protected static boolean
isCURIEBNode(String curie)
Deprecated.protected static boolean
isRelativeNode(Node node)
Deprecated.protected static boolean
isXMLNSDeclared(Document document)
Deprecated.void
processDocument(URL documentURL, Document document, ExtractionResult extractionResult)
Deprecated.void
reset()
Deprecated.Resets the parser to the original state.protected org.eclipse.rdf4j.model.IRI[]
resolveCIRIeOrIRIList(Node n, String curieOrIRIList, boolean termAllowed)
Deprecated.Resolves a whitelist separated list of CURIE or URI.protected org.eclipse.rdf4j.model.Resource
resolveCURIEOrIRI(String curieOrIRI, boolean termAllowed)
Deprecated.Resolves a CURIE or IRI string.protected org.eclipse.rdf4j.model.IRI
resolveIRI(String iriStr)
Deprecated.Resolves a IRI string as IRI.protected void
updateIRIMapping(Node node)
Deprecated.Updates the IRI mapping with the XMLNS attributes declared in the current node.protected void
updateVocabulary(Node currentNode)
Deprecated.Updates the vocabulary context with possible @vocab declarations.
-
-
-
Field Detail
-
CURIE_SEPARATOR
public static final String CURIE_SEPARATOR
Deprecated.- See Also:
- Constant Field Values
-
IRI_PREFIX_SEPARATOR
public static final char IRI_PREFIX_SEPARATOR
Deprecated.- See Also:
- Constant Field Values
-
IRI_SCHEMA_SEPARATOR
public static final String IRI_SCHEMA_SEPARATOR
Deprecated.- See Also:
- Constant Field Values
-
IRI_PATH_SEPARATOR
public static final String IRI_PATH_SEPARATOR
Deprecated.- See Also:
- Constant Field Values
-
HEAD_TAG
public static final String HEAD_TAG
Deprecated.- See Also:
- Constant Field Values
-
BODY_TAG
public static final String BODY_TAG
Deprecated.- See Also:
- Constant Field Values
-
XMLNS_ATTRIBUTE
public static final String XMLNS_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
XML_LANG_ATTRIBUTE
public static final String XML_LANG_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
REL_ATTRIBUTE
public static final String REL_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
REV_ATTRIBUTE
public static final String REV_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
ABOUT_ATTRIBUTE
public static final String ABOUT_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
RESOURCE_ATTRIBUTE
public static final String RESOURCE_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
SRC_ATTRIBUTE
public static final String SRC_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
HREF_ATTRIBUTE
public static final String HREF_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
TYPE_ATTRIBUTE
public static final String TYPE_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
ATTRIBUTE_CSS
public static final String ATTRIBUTE_CSS
Deprecated.- See Also:
- Constant Field Values
-
SUBJECT_ATTRIBUTES
public static final String[] SUBJECT_ATTRIBUTES
Deprecated.
-
PREFIX_ATTRIBUTE
public static final String PREFIX_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
TYPEOF_ATTRIBUTE
public static final String TYPEOF_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
PROPERTY_ATTRIBUTE
public static final String PROPERTY_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
DATATYPE_ATTRIBUTE
public static final String DATATYPE_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
CONTENT_ATTRIBUTE
public static final String CONTENT_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
VOCAB_ATTRIBUTE
public static final String VOCAB_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
PROFILE_ATTRIBUTE
public static final String PROFILE_ATTRIBUTE
Deprecated.- See Also:
- Constant Field Values
-
XML_LITERAL_DATATYPE
public static final String XML_LITERAL_DATATYPE
Deprecated.- See Also:
- Constant Field Values
-
XMLNS_DEFAULT
public static final String XMLNS_DEFAULT
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDocumentBase
protected static URL getDocumentBase(URL documentURL, Document document) throws MalformedURLException
Deprecated.- Throws:
MalformedURLException
-
extractPrefixSections
protected static String[] extractPrefixSections(String prefixesDeclaration)
Deprecated.Given a prefix declaration returns a list ofprefixID:prefixURL
strings normalizing blanks where present.- Parameters:
prefixesDeclaration
- input prefix- Returns:
- list of extracted prefixes.
-
isAbsoluteIRI
protected static boolean isAbsoluteIRI(String iri)
Deprecated.
-
isCURIE
protected static boolean isCURIE(String curie)
Deprecated.
-
isCURIEBNode
protected static boolean isCURIEBNode(String curie)
Deprecated.
-
isRelativeNode
protected static boolean isRelativeNode(Node node)
Deprecated.
-
getAsPlainLiteral
protected static org.eclipse.rdf4j.model.Literal getAsPlainLiteral(Node node, String currentLanguage)
Deprecated.
-
getAsXMLLiteral
protected static org.eclipse.rdf4j.model.Literal getAsXMLLiteral(Node node) throws IOException, TransformerException
Deprecated.- Throws:
IOException
TransformerException
-
isXMLNSDeclared
protected static boolean isXMLNSDeclared(Document document)
Deprecated.
-
processDocument
public void processDocument(URL documentURL, Document document, ExtractionResult extractionResult) throws RDFa11ParserException
Deprecated.- Parameters:
documentURL
-URL
of the document to processextractionResult
- aExtractionResult
to populatedocument
- theDocument
to populate with parse content- Throws:
RDFa11ParserException
- if there is an error parsing the document
-
reset
public void reset()
Deprecated.Resets the parser to the original state.
-
updateVocabulary
protected void updateVocabulary(Node currentNode)
Deprecated.Updates the vocabulary context with possible @vocab declarations.- Parameters:
currentNode
- the current node.
-
updateIRIMapping
protected void updateIRIMapping(Node node)
Deprecated.Updates the IRI mapping with the XMLNS attributes declared in the current node.- Parameters:
node
- input node.
-
getMapping
protected org.eclipse.rdf4j.model.IRI getMapping(String prefix)
Deprecated.Returns a IRI mapping for a given prefix.- Parameters:
prefix
- input prefix.- Returns:
- IRI mapping.
-
resolveCIRIeOrIRIList
protected org.eclipse.rdf4j.model.IRI[] resolveCIRIeOrIRIList(Node n, String curieOrIRIList, boolean termAllowed) throws URISyntaxException
Deprecated.Resolves a whitelist separated list of CURIE or URI.- Parameters:
n
- current node.curieOrIRIList
- list of CURIE/URI.termAllowed
- determine whether the term should be whitelisted.- Returns:
- list of resolved URIs.
- Throws:
URISyntaxException
- if there is an error processing CURIE or URL
-
resolveIRI
protected org.eclipse.rdf4j.model.IRI resolveIRI(String iriStr)
Deprecated.Resolves a IRI string as IRI.- Parameters:
iriStr
- (partial) IRI string to be resolved.- Returns:
- the resolved IRI.
-
resolveCURIEOrIRI
protected org.eclipse.rdf4j.model.Resource resolveCURIEOrIRI(String curieOrIRI, boolean termAllowed)
Deprecated.Resolves a CURIE or IRI string.- Parameters:
curieOrIRI
- individual of CURIE/URI to resolvetermAllowed
- iftrue
the resolution can be a term.- Returns:
- the resolved resource.
-
-