Author: tommaso
Date: Mon Aug 29 21:31:20 2011
New Revision: 1163016
URL: http://svn.apache.org/viewvc?rev=1163016&view=rev
Log:
[CLEREZZA-628] - applied patch from Paolo Ciccarese
Added:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
(with props)
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
(with props)
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/ (with props)
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/pom.xml
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/ao.rdf
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/aoselectors.rdf
Modified:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/ (props changed)
incubator/clerezza/trunk/parent/uima/uima.casconsumer/pom.xml
Propchange: incubator/clerezza/trunk/parent/uima/uima.casconsumer/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Aug 29 21:31:20 2011
@@ -4,3 +4,5 @@ target
.settings
.project
+
+.classpath
Modified: incubator/clerezza/trunk/parent/uima/uima.casconsumer/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.casconsumer/pom.xml?rev=1163016&r1=1163015&r2=1163016&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.casconsumer/pom.xml (original)
+++ incubator/clerezza/trunk/parent/uima/uima.casconsumer/pom.xml Mon Aug 29
21:31:20 2011
@@ -24,6 +24,11 @@
<scope>runtime</scope>
</dependency>
<dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>uima.ontologies.ao</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.uima</groupId>
<artifactId>uimaj-ep-runtime</artifactId>
</dependency>
Added:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java?rev=1163016&view=auto
==============================================================================
---
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
(added)
+++
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
Mon Aug 29 21:31:20 2011
@@ -0,0 +1,166 @@
+package org.apache.clerezza.uima.casconsumer.ao;
+
+import org.apache.clerezza.rdf.core.BNode;
+import org.apache.clerezza.rdf.core.Triple;
+import org.apache.clerezza.rdf.core.TripleCollection;
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.clerezza.rdf.utils.GraphNode;
+import org.apache.clerezza.uima.casconsumer.CASMappingException;
+import org.apache.clerezza.uima.casconsumer.CASMappingStrategy;
+import org.apache.clerezza.uima.ontologies.annotationontology.AO;
+import org.apache.clerezza.uima.ontologies.annotationontology.AOSELECTORS;
+import org.apache.clerezza.uima.utils.UIMAUtils;
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.jcas.cas.TOP;
+import org.apache.uima.jcas.tcas.Annotation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.locks.Lock;
+
+/**
+ * {@link CASMappingStrategy} which maps a CAS object to the Annotation
Ontology format
+ */
+public class AOMappingStrategy implements CASMappingStrategy {
+
+ private final static Logger log =
LoggerFactory.getLogger(AOMappingStrategy.class);
+
+ @Override
+ public void map(CAS cas, String graphName) throws CASMappingException {
+
+ // This is creating the Graph for the annotation in Annotation Ontology
format
+ final TcManager tcManager = TcManager.getInstance();
+ final UriRef mGraphName = new UriRef(graphName);
+
+ GraphNode node = new GraphNode(new BNode(),
tcManager.createMGraph(mGraphName));
+ Lock lock = node.writeLock();
+ try {
+ lock.lock();
+
+ SelectorRegistry selectorRegistry = new SelectorRegistry();
+ // Iterate the annotations to create an index of them up front, this
+ // is incase we have references between
+ // annotations and need to output the appropriate RDF identifier out
+ // of sequence
+ Iterator<?> annotationIter = cas.getAnnotationIndex().iterator();
+ Map<Annotation, Integer> annotIndex = new HashMap<Annotation, Integer>();
+ int annotCnt = 0;
+ while (annotationIter.hasNext()) {
+ Annotation annot = (Annotation) annotationIter.next();
+ log.info("annotation index " + annotCnt);
+ annotIndex.put(annot, annotCnt);
+ annotCnt++;
+ }
+
+ UriRef annotationSetUri = new UriRef(
+ new
StringBuilder(AO.AnnotationSet.getUnicodeString()).toString());
+ log.info("AO: Annotation set uri " + annotationSetUri);
+
+ GraphNode annotationSet = new GraphNode(annotationSetUri,
node.getGraph());
+ log.info(new StringBuilder("AO: Set created ").toString());
+ annotationSet.addProperty(new
UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
+ AO.AnnotationSet);
+
+ for (FeatureStructure uimaObject : UIMAUtils.getAllFSofType(TOP.type,
cas.getJCas())) {
+
+ // set Annotation specific properties for the node
+ if (uimaObject instanceof Annotation) {
+
+ // If type is DocumentAnnotation I skip it
+ if
(uimaObject.getType().toString().equals("uima.tcas.DocumentAnnotation")) {
+ continue;
+ }
+
+ // Get persistent URI for region in document
+ Annotation annot = (Annotation) uimaObject;
+ UriRef selectorUri = selectorRegistry.get(annot.getBegin(),
annot.getEnd());
+
+ // Annotation URI
+ int annotId = annotIndex.get((Annotation) uimaObject);
+ UriRef annotationUri = new UriRef(new
StringBuilder(AO.Annotation.getUnicodeString())
+ .append("/").append(annotId).toString());
+ log.info("annotation uri " + annotationUri);
+
+ // Annotation Graph
+ GraphNode annotationNode = new GraphNode(annotationUri,
annotationSet.getGraph());
+ log.info(new StringBuilder("AO: Node created for Type ").append(
+ uimaObject.getType().toString()).toString());
+ annotationNode.addProperty(new
UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
+ new UriRef("http://purl.org/ao/Annotation"));
+
+ annotationNode.addProperty(AO.context, selectorUri);
+
+ // finally add the triple to the existing node
+ annotationSet.addProperty(AO.item, annotationNode.getNode());
+ }
+ }
+
+ Iterator<SelectorRegistry.Selector> iterator =
selectorRegistry.iterator();
+ while (iterator.hasNext()) {
+
+ SelectorRegistry.Selector sel = iterator.next();
+
+ // Get persistent URI for region in document
+ UriRef selectorUri = sel.uri;
+
+ // create a new feature node
+ GraphNode selectorNode = new GraphNode(selectorUri, node.getGraph());
+ log.info(new StringBuilder("Node created for Selector " +
selectorUri).toString());
+
+ String documentText = cas.getDocumentText();
+ selectorNode.addProperty(new
UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
+ AO.Selector);
+ selectorNode.addProperty(new
UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
+ AOSELECTORS.OffsetRangeTextSelector);
+ selectorNode.addProperty(new
UriRef("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
+ AOSELECTORS.PrefixPostfixTextSelector);
+ selectorNode.addPropertyValue(AOSELECTORS.exact, getSpan(documentText,
sel.start, sel.end));
+ selectorNode.addPropertyValue(AOSELECTORS.prefix,
+ getSpan(documentText, sel.start - 50, sel.start));
+ selectorNode.addPropertyValue(AOSELECTORS.postfix,
+ getSpan(documentText, sel.end, sel.end + 50));
+ selectorNode.addPropertyValue(AOSELECTORS.offset, sel.start);
+ selectorNode.addPropertyValue(AOSELECTORS.range, sel.end);
+ }
+
+ TripleCollection tc = node.getGraph();
+ for (Triple t : tc) {
+ log.info(t.toString());
+ }
+
+
+ } catch (Exception e) {
+ throw new CASMappingException(e);
+ } finally {
+ lock.unlock();
+ }
+
+
+ }
+
+ /**
+ * Given a documents text and a start and end offsets it returns an RDF
value for the equivalent string literal. Annotations
+ * have a convenience method for doing this but this method takes advantage
of getting the text for the given document view once.
+ *
+ * @param valueFactory used to create the RDF literal
+ * @param documentText from which to extract the span of text
+ * @param start offset into the document text where the span starts
if less than 0 will use zero instead
+ * @param end offset into the document text where the span ends. if
the end goes beyond the length of the document text it is limited to the length
+ * @return
+ */
+
+ private static String getSpan(String documentText, int start, int end) {
+ if (start < 0) {
+ start = 0;
+ }
+ if (end > documentText.length()) {
+ end = documentText.length();
+ }
+ return documentText.substring(start, end);
+ }
+}
Propchange:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/AOMappingStrategy.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java?rev=1163016&view=auto
==============================================================================
---
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
(added)
+++
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
Mon Aug 29 21:31:20 2011
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.clerezza.uima.casconsumer.ao;
+
+import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.uima.ontologies.annotationontology.AO;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+public class SelectorRegistry {
+ public class Selector {
+ public final UriRef uri;
+ public final int start;
+ public final int end;
+
+ public Selector(UriRef uri, int start, int end) {
+ this.uri=uri;
+ this.start = start;
+ this.end = end;
+ }
+
+ }
+ private HashMap<String,Selector> registry;
+ private int count;
+
+ public SelectorRegistry() {
+ registry=new HashMap<String, Selector>();
+ count=1;
+ }
+
+ public UriRef get(int start, int end) {
+ String key = start+":"+end;
+ Selector sel = registry.get(key);
+ if(sel==null) {
+ UriRef uri= new UriRef(new
StringBuilder(AO.Selector.getUnicodeString()).
+ append("/").append(count++).toString());
+
+ sel=new Selector(uri,start,end);
+ registry.put(key,sel);
+ }
+ return sel.uri;
+ }
+
+ public Iterator<Selector> iterator() {
+ return registry.values().iterator();
+ }
+
+ public int getSize() {
+ return registry.size();
+ }
+}
Propchange:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange:
incubator/clerezza/trunk/parent/uima/uima.casconsumer/src/main/java/org/apache/clerezza/uima/casconsumer/ao/SelectorRegistry.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 29 21:31:20 2011
@@ -0,0 +1,9 @@
+target
+
+.classpath
+
+*.iml
+
+.project
+
+.settings
Added: incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/pom.xml?rev=1163016&view=auto
==============================================================================
--- incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/pom.xml (added)
+++ incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/pom.xml Mon Aug 29
21:31:20 2011
@@ -0,0 +1,69 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>uima.ontologies.ao</artifactId>
+ <version>0.1-incubating-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+ <name>Clerezza - Apache UIMA and Annotation Ontology</name>
+ <description>Annotation Ontology (AO) modeling UIMA to be used with
Clerezza</description>
+ <parent>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>uima</artifactId>
+ <version>0.1-incubating-SNAPSHOT</version>
+ </parent>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>rdf.core</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>maven-ontologies-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>rdf.ao</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <resourcePath>${basedir}/src/main/resources</resourcePath>
+ <sources>
+
<source>${basedir}/target/generated-sources/main/java</source>
+ </sources>
+ <namespaceOfOntology>
+ <property>
+ <name>ao.rdf</name>
+ <value>http://purl.org/ao/</value>
+ </property>
+ </namespaceOfOntology>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>rdf.ao.selectors</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <resourcePath>${basedir}/src/main/resources</resourcePath>
+ <sources>
+
<source>${basedir}/target/generated-sources/main/java</source>
+ </sources>
+ <namespaceOfOntology>
+ <property>
+ <name>aoselectors.rdf</name>
+ <value>http://purl.org/ao/selectors/</value>
+ </property>
+ </namespaceOfOntology>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/ao.rdf
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/ao.rdf?rev=1163016&view=auto
==============================================================================
---
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/ao.rdf
(added)
+++
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/ao.rdf
Mon Aug 29 21:31:20 2011
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rdf:RDF
+ xmlns:ao="http://purl.org/ao"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#"
+ xmlns:dcterms="http://purl.org/dc/terms/"
+ xmlns:skos="http://www.w3.org/2004/02/skos/core#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+
+ <!-- Vocabulary generic metadata about authors and a short description -->
+ <owl:Ontology rdf:about="http://purl.org/ao/" dc:title="RDFS Vocabulary
for UIMA Entities/Annotations and Features in Annotation Ontology"
+ dc:description="This vocabulary models and describe the result of a
generic text extraction performed by UIMA" >
+ <dcterms:creator rdf:resource="http://www.paolociccarese.info" />
+ </owl:Ontology>
+
+ <rdfs:Class rdf:about="http://purl.org/ao/Annotation"
rdfs:label="Annotation" skos:definition="Annotation" vs:term_status="stable">
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao"/>
+ </rdfs:Class>
+
+ <rdfs:Class rdf:about="http://purl.org/ao/AnnotationSet"
rdfs:label="Annotation Set" skos:definition="Annotation Set"
vs:term_status="stable">
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao"/>
+ </rdfs:Class>
+
+ <rdfs:Class rdf:about="http://purl.org/ao/Selector" rdfs:label="Selector"
skos:definition="Selector" vs:term_status="stable">
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/"/>
+ </rdfs:Class>
+
+ <rdf:Property rdf:about="http://purl.org/ao/context"
vs:term_status="stable" rdfs:label="context" skos:definition="context">
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
+ <rdfs:domain rdf:resource="http://purl.org/ao/Annotation"/>
+ <rdfs:range rdf:resource="http://purl.org/ao/Selector"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/"/>
+ </rdf:Property>
+
+ <rdf:Property rdf:about="http://purl.org/ao/item" vs:term_status="stable"
rdfs:label="item" skos:definition="item">
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/"/>
+ </rdf:Property>
+
+</rdf:RDF>
+
+
Added:
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/aoselectors.rdf
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/aoselectors.rdf?rev=1163016&view=auto
==============================================================================
---
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/aoselectors.rdf
(added)
+++
incubator/clerezza/trunk/parent/uima/uima.ontologies.ao/src/main/resources/org/apache/clerezza/uima/ontologies/annotationontology/aoselectors.rdf
Mon Aug 29 21:31:20 2011
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rdf:RDF
+ xmlns:ao="http://purl.org/ao"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#"
+ xmlns:dcterms="http://purl.org/dc/terms/"
+ xmlns:skos="http://www.w3.org/2004/02/skos/core#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+
+ <!-- Vocabulary generic metadata about authors and a short description -->
+ <owl:Ontology rdf:about="http://purl.org/ao/selectors/" dc:title="RDFS
Vocabulary for UIMA Entities/Annotations and Features in Annotation Ontology"
+ dc:description="This vocabulary models and describe the result of a
generic text extraction performed by UIMA" >
+ <dcterms:creator rdf:resource="http://www.paolociccarese.info" />
+ </owl:Ontology>
+
+ <rdf:Property rdf:about="http://purl.org/ao/selectors/exact"
vs:term_status="stable" rdfs:label="exact" skos:definition="exact">
+ <rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
+ <rdfs:domain rdf:resource="http://purl.org/ao/Selector"/>
+ <rdfs:range
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdf:Property>
+
+ <rdfs:Class
rdf:about="http://purl.org/ao/selectors/OffsetRangeTextSelector"
rdfs:label="(ao-sel) Offset/Range Text Selector" skos:definition="Offset/Range
Text Selector" vs:term_status="stable">
+ <rdfs:subClassOf rdf:resource="http://purl.org/ao/Selector"/>
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdfs:Class>
+
+ <rdf:Property rdf:about="http://purl.org/ao/selectors/offset"
vs:term_status="stable" rdfs:label="offset" skos:definition="offset">
+ <rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
+ <rdfs:domain
rdf:resource="http://purl.org/ao/selectors/OffsetRangeTextSelector"/>
+ <rdfs:range
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdf:Property>
+
+ <rdf:Property rdf:about="http://purl.org/ao/selectors/range"
vs:term_status="stable" rdfs:label="range" skos:definition="range">
+ <rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
+ <rdfs:domain
rdf:resource="http://purl.org/ao/selectors/OffsetRangeTextSelector"/>
+ <rdfs:range
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdf:Property>
+
+ <rdfs:Class
rdf:about="http://purl.org/ao/selectors/PrefixPostfixTextSelector"
rdfs:label="(ao-sel) Prefix/Postfix Text Selector"
skos:definition="Prefix/Postfix Text Selector" vs:term_status="stable">
+ <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdfs:Class>
+
+ <rdf:Property rdf:about="http://purl.org/ao/selectors/prefix"
vs:term_status="stable" rdfs:label="prefix" skos:definition="prefix">
+ <rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
+ <rdfs:domain
rdf:resource="http://purl.org/ao/selectors/PrefixPostfixTextSelector"/>
+ <rdfs:range
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdf:Property>
+
+ <rdf:Property rdf:about="http://purl.org/ao/selectors/postfix"
vs:term_status="stable" rdfs:label="postfix" skos:definition="postfix">
+ <rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
+ <rdfs:domain
rdf:resource="http://purl.org/ao/selectors/PrefixPostfixTextSelector"/>
+ <rdfs:range
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+ <rdfs:isDefinedBy rdf:resource="http://purl.org/ao/selectors/"/>
+ </rdf:Property>
+
+</rdf:RDF>
+
+