public SerializationContext(PrefixMapping prefixMap, boolean usePlainLiterals) { this(new Prologue(prefixMap), null); this.usePlainLiterals = usePlainLiterals; }
public UpdateVisitorSink(UpdateVisitor worker) { this.prologue = new Prologue(); this.worker = worker; }
public SerializationContext(PrefixMapping prefixMap, NodeToLabelMap bMap, boolean usePlainLiterals) { this(new Prologue(prefixMap), bMap); this.usePlainLiterals = usePlainLiterals; }
public SerializationContext(PrefixMapping prefixMap) { this(new Prologue(prefixMap)) ; }
public SerializationContext(PrefixMapping prefixMap, NodeToLabelMap bMap) { this(new Prologue(prefixMap), bMap) ; }
public RdfMapperEngineImpl(SparqlService sparqlService, RdfTypeFactory typeFactory) { this(sparqlService, typeFactory, new Prologue(), null); //new RdfPopulationContextImpl()); }
@Bean @Autowired public Prologue defaultPrologue(PrefixMapping prefixMapping) { Prologue result = new Prologue(prefixMapping); return result; }
public SerializationContext(Prologue prologue, NodeToLabelMap bMap) { this.prologue = prologue ; if ( this.prologue == null ) this.prologue = new Prologue() ; bNodeMap = bMap ; if ( bMap == null ) bNodeMap = new NodeToLabelMap("b", false) ; }
@Override public String toString() { String str = steps == null || steps.isEmpty() ? "" : PathWriter.asString(toPropertyPath(this), new Prologue(PrefixMapping.Extended)); str = str.replaceAll("\\^(\r|\n)+", "^"); return "SimplePath [" + str + "]"; }
private static ParseHandler createParseHandler(PrefixMapping pmap) { if ( useResolver ) { Prologue prologue = new Prologue(pmap) ; return new ParseHandlerResolver(prologue) ; } else return new ParseHandlerPlain() ; }
public SparqlParserConfig setPrefixMapping(PrefixMapping pm) { if(prologue == null) { prologue = new Prologue(pm, IRIResolver.createNoResolve()); } else { prologue.setPrefixMapping(pm); } return this; }
public Prologue copy() { PrefixMapping prefixMap = new PrefixMappingImpl() ; prefixMap.setNsPrefixes(this.prefixMap) ; String baseURI = null ; if ( resolver != null) baseURI = resolver.getBaseIRIasString() ; return new Prologue(prefixMap, baseURI) ; }
public static SparqlUpdateParserImpl create(Syntax syntax) { Prologue prologue = new Prologue(); prologue.setBaseURI(IRIResolver.createNoResolve()); SparqlUpdateParserImpl result = create(syntax, prologue); return result; }
public SparqlParserConfig applyDefaults() { if(syntax == null) { syntax = Syntax.syntaxARQ; } if(prologue == null) { prologue = new Prologue(PrefixMapping.Extended); } if(prologue.getResolver() == null) { prologue.setResolver(IRIResolver.createNoResolve()); } return this; }
@Override public UpdateSerializer create(Syntax syntax, Prologue prologue, IndentedWriter writer) { if (!prologue.explicitlySetBaseURI()) prologue = new Prologue(prologue.getPrefixMapping(), (IRIResolver) null); SerializationContext context = new SerializationContext(prologue); return new UpdateWriter(writer, context); }
/** Establish a prologue for formatting output. Return "null" for none found. */ private static Prologue choosePrologue(ResultSet resultSet, Context context) { try { if ( context != null && context.get(ARQConstants.symPrologue) != null ) return context.get(ARQConstants.symPrologue); Model m = resultSet.getResourceModel(); if ( m != null ) return new Prologue(m); } catch (Exception ex) { Log.warn(ARQ.getExecLogger(), "Failed to establish a 'Prologue' for text output: "+ex.getMessage()); } return null; }
public Prologue sub(PrefixMapping newMappings, String base) { // New prefix mappings PrefixMapping ext = getPrefixMapping() ; if ( newMappings != null ) ext = new PrefixMapping2(ext, newMappings) ; // New base. IRIResolver r = resolver ; if ( base != null ) r = IRIResolver.create(base) ; return new Prologue(ext, r) ; }
public static void output(UpdateRequest request, IndentedWriter out) { Prologue prologue = request ; if ( ! request.explicitlySetBaseURI() ) prologue = new Prologue(request.getPrefixMapping(), (IRIResolver)null) ; SerializationContext sCxt = new SerializationContext(prologue, new NodeToLabelMapBNode()) ; output(request, out, sCxt); }
public static PropertyRelation create(String elementStr, String sourceVarName, String propertyVarName, String targetVarName) { Var sourceVar = Var.alloc(sourceVarName); Var propertyVar = Var.alloc(propertyVarName); Var targetVar = Var.alloc(targetVarName); SparqlElementParser parser = SparqlElementParserImpl.create(Syntax.syntaxARQ, new Prologue()); Element element = parser.apply(elementStr); PropertyRelation result = new PropertyRelation(element, sourceVar, propertyVar, targetVar); return result; } }
private static void parse(String path1, String path2) { Prologue prologue = new Prologue(pmap) ; Path p1 = PathParser.parse(path1, prologue) ; Path p2 = PathParser.parse(path2, prologue) ; assertEquals(p1, p2) ; }