/** * @param knownVocab the set of tags that are known by this generator */ public OBOTagValuePairList(List<OBOVocabulary> knownVocab) { vocab = knownVocab; iriSFP = new SimpleIRIShortFormProvider(); }
/** * @param knownVocab the set of tags that are known by this generator */ public OBOTagValuePairList(List<OBOVocabulary> knownVocab) { this.vocab = knownVocab; iriSFP = new SimpleIRIShortFormProvider(); }
/** * @param knownVocab the set of tags that are known by this generator */ public OBOTagValuePairList(List<OBOVocabulary> knownVocab) { this.vocab = knownVocab; iriSFP = new SimpleIRIShortFormProvider(); }
public OWLObjectRenderingContext(DeprecatedObjectChecker deprecatedObjectChecker, ClassSatisfiabilityChecker classSatisfiabilityChecker, ObjectPropertySatisfiabilityChecker objectPropertySatisfiabilityChecker, DataPropertySatisfiabilityChecker dataPropertySatisfiabilityChecker, LinkFactory linkFactory, ShortFormProvider shortFormProvider, OntologyIRIShortFormProvider ontologyIRIShortFormProvider) { this.deprecatedObjectChecker = deprecatedObjectChecker; this.classSatisfiabilityChecker = classSatisfiabilityChecker; this.objectPropertySatisfiabilityChecker = objectPropertySatisfiabilityChecker; this.dataPropertySatisfiabilityChecker = dataPropertySatisfiabilityChecker; this.linkFactory = linkFactory; this.shortFormProvider = shortFormProvider; this.ontologyIRIShortFormProvider = ontologyIRIShortFormProvider; this.iriShortFormProvider = new SimpleIRIShortFormProvider(); }
public OWLObjectRenderingContext(DeprecatedObjectChecker deprecatedObjectChecker, ClassSatisfiabilityChecker classSatisfiabilityChecker, ObjectPropertySatisfiabilityChecker objectPropertySatisfiabilityChecker, DataPropertySatisfiabilityChecker dataPropertySatisfiabilityChecker, LinkFactory linkFactory, ShortFormProvider shortFormProvider, OntologyIRIShortFormProvider ontologyIRIShortFormProvider) { this.deprecatedObjectChecker = deprecatedObjectChecker; this.classSatisfiabilityChecker = classSatisfiabilityChecker; this.objectPropertySatisfiabilityChecker = objectPropertySatisfiabilityChecker; this.dataPropertySatisfiabilityChecker = dataPropertySatisfiabilityChecker; this.linkFactory = linkFactory; this.shortFormProvider = shortFormProvider; this.ontologyIRIShortFormProvider = ontologyIRIShortFormProvider; this.iriShortFormProvider = new SimpleIRIShortFormProvider(); }
/** * Constructs an annotation short form provider. * * @param annotationProperties A {@code List} of preferred annotation properties. The list is * searched from start to end, so that annotations that have a property at the start of * the list have a higher priority and are selected over annotations with properties that * appear towards or at the end of the list. * @param preferredLanguageMap A map which maps annotation properties to preferred languages. * For any given annotation property there may be a list of preferred languages. * Languages at the start of the list have a higher priority over languages at the end of * the list. This parameter may be empty but it must not be {@code null}. * @param ontologySetProvider An {@code OWLOntologySetProvider} which provides a set of ontology * from which candidate annotation axioms should be taken. For a given entity, all * ontologies are examined. * @param alternateShortFormProvider A short form provider which will be used to generate the * short form for an entity that does not have any annotations. This provider will also * be used in the case where the value of an annotation is an {@code OWLIndividual} for * providing the short form of the individual. */ public AnnotationValueShortFormProvider(List<OWLAnnotationProperty> annotationProperties, Map<OWLAnnotationProperty, List<String>> preferredLanguageMap, OWLOntologySetProvider ontologySetProvider, ShortFormProvider alternateShortFormProvider) { this(ontologySetProvider, alternateShortFormProvider, new SimpleIRIShortFormProvider(), annotationProperties, preferredLanguageMap); }
public DLSyntaxObjectRenderer() { this.shortFormProvider = new SimpleShortFormProvider(); this.iriShortFormProvider = new SimpleIRIShortFormProvider(); this.buffer = new StringBuilder(); }
/** * Default constructor. */ public DLSyntaxObjectRenderer() { shortFormProvider = new SimpleShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); buffer = new StringBuilder(); }
/** * Default constructor. */ public DLSyntaxObjectRenderer() { shortFormProvider = new SimpleShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); buffer = new StringBuilder(); }
/** * Default constructor. */ public DLSyntaxObjectRenderer() { shortFormProvider = new SimpleShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); buffer = new StringBuilder(); }
/** * Default constructor. */ public DLSyntaxObjectRenderer() { shortFormProvider = new SimpleShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); buffer = new StringBuilder(); }
public DLSyntaxObjectRenderer() { shortFormProvider = new SimpleShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); buffer = new StringBuilder(); }
private StyledString getAxiomRendering(OWLAxiom axiom) { OWLEditorKitShortFormProvider sfp = new OWLEditorKitShortFormProvider(editorKit); OWLEditorKitOntologyShortFormProvider ontologySfp = new OWLEditorKitOntologyShortFormProvider(editorKit); OWLEditorKitIRIShortFormProvider iriSfp = new OWLEditorKitIRIShortFormProvider(editorKit, new SimpleIRIShortFormProvider()); OWLObjectRenderingContext renderingContext = new OWLObjectRenderingContext(sfp, iriSfp, ontologySfp); OWLObjectStyledStringRenderer renderer = new OWLObjectStyledStringRenderer(renderingContext); return renderer.getRendering(axiom); }
private StyledString getAxiomRendering(OWLAxiom axiom) { OWLEditorKitShortFormProvider sfp = new OWLEditorKitShortFormProvider(editorKit); OWLEditorKitOntologyShortFormProvider ontologySfp = new OWLEditorKitOntologyShortFormProvider(editorKit); OWLEditorKitIRIShortFormProvider iriSfp = new OWLEditorKitIRIShortFormProvider(editorKit, new SimpleIRIShortFormProvider()); OWLObjectRenderingContext renderingContext = new OWLObjectRenderingContext(sfp, iriSfp, ontologySfp); OWLObjectStyledStringRenderer renderer = new OWLObjectStyledStringRenderer(renderingContext); return renderer.getRendering(axiom); }
protected String renderObject(OWLObject o) { if (o instanceof OWLAnnotationAssertionAxiom && ((OWLAnnotationAssertionAxiom) o).getSubject() instanceof IRI) { SimpleIRIShortFormProvider iriShortFormProvider = new SimpleIRIShortFormProvider(); OWLAnnotationAssertionAxiom axiom = (OWLAnnotationAssertionAxiom) o; StringBuffer buffer = new StringBuffer(iriShortFormProvider.getShortForm((IRI) axiom.getSubject())); buffer.append(" "); buffer.append(new ManchesterOWLSyntaxOWLObjectRendererImpl().render(axiom.getAnnotation())); return buffer.toString(); } else { return new ManchesterOWLSyntaxOWLObjectRendererImpl().render(o); } }
protected String renderObject(OWLObject o) { if (o instanceof OWLAnnotationAssertionAxiom && ((OWLAnnotationAssertionAxiom) o).getSubject() instanceof IRI) { SimpleIRIShortFormProvider iriShortFormProvider = new SimpleIRIShortFormProvider(); OWLAnnotationAssertionAxiom axiom = (OWLAnnotationAssertionAxiom) o; StringBuffer buffer = new StringBuffer(iriShortFormProvider.getShortForm((IRI) axiom.getSubject())); buffer.append(" "); buffer.append(new ManchesterOWLSyntaxOWLObjectRendererImpl().render(axiom.getAnnotation())); return buffer.toString(); } else { return new ManchesterOWLSyntaxOWLObjectRendererImpl().render(o); } }
public void initialise() { final OWLDataFactory df = getOWLModelManager().getOWLDataFactory(); // convert IRI -> lang map into annotation property -> lang map final List<OWLAnnotationProperty> properties = new ArrayList<>(); ListMultimap<OWLAnnotationProperty, String> propLangMap = ArrayListMultimap.create(); final ListMultimap<IRI, String> iriLangMap = OWLRendererPreferences.getInstance().getAnnotationLangMap(); for (IRI iri : OWLRendererPreferences.getInstance().getAnnotationIRIs()){ final OWLAnnotationProperty ap = df.getOWLAnnotationProperty(iri); properties.add(ap); propLangMap.putAll(ap, iriLangMap.get(iri)); } provider = new AnnotationValueShortFormProvider( () -> getOWLModelManager().getActiveOntologies(), new OWLEntityRendererImpl(), new SimpleIRIShortFormProvider(), properties, toMap(propLangMap)); }
public void initialise() { final OWLDataFactory df = getOWLModelManager().getOWLDataFactory(); // convert IRI -> lang map into annotation property -> lang map final List<OWLAnnotationProperty> properties = new ArrayList<>(); ListMultimap<OWLAnnotationProperty, String> propLangMap = ArrayListMultimap.create(); final ListMultimap<IRI, String> iriLangMap = OWLRendererPreferences.getInstance().getAnnotationLangMap(); for (IRI iri : OWLRendererPreferences.getInstance().getAnnotationIRIs()){ final OWLAnnotationProperty ap = df.getOWLAnnotationProperty(iri); properties.add(ap); propLangMap.putAll(ap, iriLangMap.get(iri)); } provider = new AnnotationValueShortFormProvider( () -> getOWLModelManager().getActiveOntologies(), new OWLEntityRendererImpl(), new SimpleIRIShortFormProvider(), properties, toMap(propLangMap)); }
public OWLObjectRenderingContext() { deprecatedObjectChecker = new NullDeprecatedObjectChecker(); classSatisfiabilityChecker = new NullClassSatisfiabilityChecker(); objectPropertySatisfiabilityChecker = new NullObjectPropertySatisfiabilityChecker(); dataPropertySatisfiabilityChecker = new NullDataPropertySatisfiabilityChecker(); linkFactory = new NullLinkFactory(); shortFormProvider = new SimpleShortFormProvider(); ontologyIRIShortFormProvider = new OntologyIRIShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); }
public OWLObjectRenderingContext() { deprecatedObjectChecker = new NullDeprecatedObjectChecker(); classSatisfiabilityChecker = new NullClassSatisfiabilityChecker(); objectPropertySatisfiabilityChecker = new NullObjectPropertySatisfiabilityChecker(); dataPropertySatisfiabilityChecker = new NullDataPropertySatisfiabilityChecker(); linkFactory = new NullLinkFactory(); shortFormProvider = new SimpleShortFormProvider(); ontologyIRIShortFormProvider = new OntologyIRIShortFormProvider(); iriShortFormProvider = new SimpleIRIShortFormProvider(); }