public Prologue() { this.prefixMap = PrefixMapFactory.createForInput() ; this.resolver = null ; }
public Prologue() { this.prefixMap = PrefixMapFactory.createForInput() ; this.resolver = null ; }
@Override public void start() { triples.clear() ; quads.clear() ; prefixes = PrefixMapFactory.createForInput(); }
/** * Creates a new prefix map, initialized from a Map of prefix to IRI string. * * @param pmap Mapping from prefix to IRI string * @return Prefix Map */ public static PrefixMap createForInput(Map<String, String> pmap) { PrefixMap created = createForInput(); created.putAll(pmap); return created; }
public Prologue copy() { PrefixMap prefixMap = PrefixMapFactory.createForInput(this.prefixMap) ; return new Prologue(prefixMap, resolver) ; }
/** * Creates a new prefix map, initialized from a Map of prefix to IRI string. * * @param pmap Mapping from prefix to IRI string * @return Prefix Map */ public static PrefixMap createForInput(Map<String, String> pmap) { PrefixMap created = createForInput(); created.putAll(pmap); return created; }
public Prologue copy() { PrefixMap prefixMap = PrefixMapFactory.createForInput(this.prefixMap) ; return new Prologue(prefixMap, resolver) ; }
/** * Creates a new prefix map which is intended for use in iput which starts * with a copy of an existing map * <p> * Will use whatever the version of ARQ you are using considers the best * implementation for input, this may change from release to release. * </p> * * @param pmap * Prefix Map to copy * * @return Prefix Map */ public static PrefixMap createForInput(PrefixMapping pmap) { PrefixMap created = createForInput(); created.putAll(pmap); return created; }
/** * Creates a new prefix map which is intended for use in iput which starts * with a copy of an existing map * <p> * Will use whatever the version of ARQ you are using considers the best * implementation for input, this may change from release to release. * </p> * * @param pmap * Prefix Map to copy * * @return Prefix Map */ public static PrefixMap createForInput(PrefixMapping pmap) { PrefixMap created = createForInput(); created.putAll(pmap); return created; }
public static Prologue create(String base, PrefixMapping pmapping) { PrefixMap pmap = null ; if ( pmapping != null ) { pmap = PrefixMapFactory.createForInput(pmapping) ; } IRIResolver resolver = null ; if ( base != null ) resolver = IRIResolver.create(base) ; return new Prologue(pmap, resolver) ; }
public void usePrologueFrom(Prologue other) { // Copy. prefixMap = PrefixMapFactory.createForInput(other.prefixMap) ; seenBaseURI = false ; if ( other.resolver != null ) resolver = IRIResolver.create(other.resolver.getBaseIRIasString()) ; }
public static Prologue create(String base, PrefixMapping pmapping) { PrefixMap pmap = null ; if ( pmapping != null ) { pmap = PrefixMapFactory.createForInput(pmapping) ; } IRIResolver resolver = null ; if ( base != null ) resolver = IRIResolver.create(base) ; return new Prologue(pmap, resolver) ; }
public void usePrologueFrom(Prologue other) { // Copy. prefixMap = PrefixMapFactory.createForInput(other.prefixMap) ; seenBaseURI = false ; if ( other.resolver != null ) resolver = IRIResolver.create(other.resolver.getBaseIRIasString()) ; }
/** Create a {@link ParserProfile}. */ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, IRIResolver resolver, boolean checking) { return new ParserProfileStd(factory, errorHandler, resolver, PrefixMapFactory.createForInput(), RIOT.getContext().copy(), checking, false); }
/** Create a {@link ParserProfile} with default settings, and a specific error handler. */ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) { return new ParserProfileStd(factory, errorHandler, IRIResolver.create(), PrefixMapFactory.createForInput(), RIOT.getContext().copy(), checking, false); }
public static ParserProfile profile(String baseIRI, boolean resolveIRIs, boolean checking, ErrorHandler handler) { LabelToNode labelToNode = true ? SyntaxLabels.createLabelToNode() : LabelToNode.createUseLabelEncoded() ; Prologue prologue ; if ( resolveIRIs ) prologue = new Prologue(PrefixMapFactory.createForInput(), IRIResolver.create(baseIRI)) ; else prologue = new Prologue(PrefixMapFactory.createForInput(), IRIResolver.createNoResolve()) ; if ( checking ) return new ParserProfileChecker(prologue, handler, labelToNode) ; else return new ParserProfileBase(prologue, handler, labelToNode) ; }
static ParserProfile profile() { // Don't do anything with IRIs or blank nodes. Prologue prologue = new Prologue(PrefixMapFactory.createForInput(), IRIResolver.createNoResolve()) ; ErrorHandler handler = ErrorHandlerFactory.getDefaultErrorHandler() ; FactoryRDF factory = RiotLib.factoryRDF(LabelToNode.createUseLabelAsGiven()) ; ParserProfile profile = RiotLib.createParserProfile(factory, handler, false); return profile ; }
static ParserProfile profile() { // Don't do anything with IRIs. Prologue prologue = new Prologue(PrefixMapFactory.createForInput(), IRIResolver.createNoResolve()) ; ErrorHandler handler = ErrorHandlerFactory.getDefaultErrorHandler() ; ParserProfile profile = new ParserProfileBase(prologue, handler) ; profile.setLabelToNode(LabelToNode.createUseLabelAsGiven()) ; // Include safe bNode labels. return profile ; }
private ParserProfile makeParserProfile(IRIResolver resolver, ErrorHandler errorHandler, boolean checking) { if ( errorHandler == null ) errorHandler = ErrorHandlerFactory.errorHandlerStd; return new ParserProfileStd(RiotLib.factoryRDF(), errorHandler, resolver, PrefixMapFactory.createForInput(), RIOT.getContext().copy(), checking, false) ; }
/** Internal ParserProfile used to create nodes from strings. */ private static ParserProfile setupInternalParserProfile() { PrefixMap pmap = PrefixMapFactory.createForInput(); pmap.add("rdf", ARQConstants.rdfPrefix); pmap.add("rdfs", ARQConstants.rdfsPrefix); pmap.add("xsd", ARQConstants.xsdPrefix); pmap.add("owl" , ARQConstants.owlPrefix); pmap.add("fn" , ARQConstants.fnPrefix); pmap.add("op" , ARQConstants.fnPrefix); pmap.add("ex" , "http://example/ns#"); pmap.add("" , "http://example/"); return new ParserProfileStd(RiotLib.factoryRDF(), ErrorHandlerFactory.errorHandlerStd, IRIResolver.create(), pmap, RIOT.getContext().copy(), true, false); }