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 theRioimplementations 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 StringABOUT_ATTRIBUTEDeprecated.static StringATTRIBUTE_CSSDeprecated.static StringBODY_TAGDeprecated.static StringCONTENT_ATTRIBUTEDeprecated.static StringCURIE_SEPARATORDeprecated.static StringDATATYPE_ATTRIBUTEDeprecated.static StringHEAD_TAGDeprecated.static StringHREF_ATTRIBUTEDeprecated.static StringIRI_PATH_SEPARATORDeprecated.static charIRI_PREFIX_SEPARATORDeprecated.static StringIRI_SCHEMA_SEPARATORDeprecated.static StringPREFIX_ATTRIBUTEDeprecated.static StringPROFILE_ATTRIBUTEDeprecated.static StringPROPERTY_ATTRIBUTEDeprecated.static StringREL_ATTRIBUTEDeprecated.static StringRESOURCE_ATTRIBUTEDeprecated.static StringREV_ATTRIBUTEDeprecated.static StringSRC_ATTRIBUTEDeprecated.static String[]SUBJECT_ATTRIBUTESDeprecated.static StringTYPE_ATTRIBUTEDeprecated.static StringTYPEOF_ATTRIBUTEDeprecated.static StringVOCAB_ATTRIBUTEDeprecated.static StringXML_LANG_ATTRIBUTEDeprecated.static StringXML_LITERAL_DATATYPEDeprecated.static StringXMLNS_ATTRIBUTEDeprecated.static StringXMLNS_DEFAULTDeprecated.
-
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:prefixURLstrings normalizing blanks where present.protected static org.eclipse.rdf4j.model.LiteralgetAsPlainLiteral(Node node, String currentLanguage)Deprecated.protected static org.eclipse.rdf4j.model.LiteralgetAsXMLLiteral(Node node)Deprecated.protected static URLgetDocumentBase(URL documentURL, Document document)Deprecated.protected org.eclipse.rdf4j.model.IRIgetMapping(String prefix)Deprecated.Returns a IRI mapping for a given prefix.protected static booleanisAbsoluteIRI(String iri)Deprecated.protected static booleanisCURIE(String curie)Deprecated.protected static booleanisCURIEBNode(String curie)Deprecated.protected static booleanisRelativeNode(Node node)Deprecated.protected static booleanisXMLNSDeclared(Document document)Deprecated.voidprocessDocument(URL documentURL, Document document, ExtractionResult extractionResult)Deprecated.voidreset()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.ResourceresolveCURIEOrIRI(String curieOrIRI, boolean termAllowed)Deprecated.Resolves a CURIE or IRI string.protected org.eclipse.rdf4j.model.IRIresolveIRI(String iriStr)Deprecated.Resolves a IRI string as IRI.protected voidupdateIRIMapping(Node node)Deprecated.Updates the IRI mapping with the XMLNS attributes declared in the current node.protected voidupdateVocabulary(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:prefixURLstrings 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:
IOExceptionTransformerException
-
isXMLNSDeclared
protected static boolean isXMLNSDeclared(Document document)
Deprecated.
-
processDocument
public void processDocument(URL documentURL, Document document, ExtractionResult extractionResult) throws RDFa11ParserException
Deprecated.- Parameters:
documentURL-URLof the document to processextractionResult- aExtractionResultto populatedocument- theDocumentto 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- iftruethe resolution can be a term.- Returns:
- the resolved resource.
-
-