/*
* Created on Dec 16, 2004
*/
/**
* @author Evren Sirin
*/
docManager.setProcessImports( false );
}
return ontModel;
}
return ontModel;
}
public void prepare() {
}
public void classify() {
if(reasoner instanceof PelletReasoner) {
}
}
public boolean isClassified() {
if(reasoner instanceof PelletReasoner) {
}
return true;
}
public boolean isConsistent() {
if(reasoner instanceof PelletReasoner) {
}
return true;
// ValidityReport validation = ontModel.validate();
//
// // if there is no validation report assume everything is fine
// return ( validation == null ) || validation.isValid();
}
this.baseOntology = ontology;
}
return baseOntology;
}
// public void enableReasoner(boolean enabled) {
// if(reasoner == null)
// throw new IllegalArgumentException(
// "There is no reasoner attached to enable/disable. First attach a reasoner using setReasoner function!");
// }
}
}
throw new IllegalArgumentException(
}
else
throw new IllegalArgumentException(
"Jena implementation only supports reasoners that implements the " + Reasoner.class);
}
return reasoner;
}
// TODO cache nil list
return list;
}
return list;
}
return list;
}
// TODO cache nil list
return list;
}
return list;
}
return list;
}
}
return ontModel.containsResource(r);
}
}
return type;
}
}
return entity;
}
return entity;
}
}
}
return c;
}
}
}
return prop;
}
OWLObjectProperty p = null;
}
return p;
}
OWLDataProperty p = null;
}
return p;
}
}
return getAllIndividuals(
ind.getOntology());
}
}
return getAllIndividuals(
ind.getOntology());
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#isSubClassOf(org.mindswap.owl.OWLClass, org.mindswap.owl.OWLClass)
*/
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#isDisjoint(org.mindswap.owl.OWLClass, org.mindswap.owl.OWLClass)
*/
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#isEquivalent(org.mindswap.owl.OWLType, org.mindswap.owl.OWLType)
*/
return true;
}
// FIXME datatype equivalance
return false;
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#isDisjoint(org.mindswap.owl.OWLType, org.mindswap.owl.OWLType)
*/
// FIXME datatype disjointness
return true;
}
return getSubClasses(c, false);
}
: RDFS.subClassOf;
return getAllClasses(
(Resource) c.getImplementation()),
c.getOntology());
}
if(p instanceof OWLObjectProperty) {
return getAllObjectProperties(
(Resource) p.getImplementation()),
p.getOntology());
}
else {
return getAllDataProperties(
(Resource) p.getImplementation()),
p.getOntology());
}
}
if(p instanceof OWLObjectProperty) {
return getAllObjectProperties(
(Resource) p.getImplementation()),
p.getOntology());
}
else {
return getAllDataProperties(
(Resource) p.getImplementation()),
p.getOntology());
}
}
if(p instanceof OWLObjectProperty) {
return getAllObjectProperties(
(Resource) p.getImplementation(),
p.getOntology());
}
else {
return getAllDataProperties(
(Resource) p.getImplementation(),
p.getOntology());
}
}
return getSuperClasses(c, false);
}
: RDFS.subClassOf;
return getAllClasses(
(Resource) c.getImplementation(),
c.getOntology());
}
return getAllClasses(
(Resource) c.getImplementation()),
c.getOntology());
}
return getAllIndividuals(
(Resource) c.getImplementation()),
c.getOntology());
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getTypes(org.mindswap.owl.OWLIndividual)
*/
return getAllClasses(
ind.getOntology());
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getProperty(org.mindswap.owl.OWLIndividual, org.mindswap.owl.OWLObjectProperty)
*/
return getFirstIndividual(
ind.getOntology());
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getProperties(org.mindswap.owl.OWLIndividual, org.mindswap.owl.OWLObjectProperty)
*/
return getAllIndividuals(
ind.getOntology());
}
null,
while(i.hasNext()) {
continue;
// OWLProperty prop = getProperty(URI.create(pred.getURI()));
// if(prop != null) {
// if(prop instanceof OWLObjectProperty) {
// OWLIndividualList list = (OWLIndividualList) result.get(prop);
// if(list == null) {
// list = OWLFactory.createIndividualList();
// result.put(prop, list);
// }
// list.add(OWLModelImpl.this.wrapIndividual(stmt.getResource()));
// }
// else {
// OWLIndividualList list = (OWLIndividualList) result.get(prop);
// if(list == null) {
// list = OWLFactory.createIndividualList();
// result.put(prop, list);
// }
// list.add(OWLModelImpl.this.wrapDataValue(stmt.getLiteral()));
// }
// }
}
}
else {
}
}
}
return result;
}
return getDeclaredProperties(claz, true);
}
while(i.hasNext()) {
continue;
if (ontProp.isDatatypeProperty()) {
} else {
}
}
return result;
}
}
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getProperty(org.mindswap.owl.OWLIndividual, org.mindswap.owl.OWLDataProperty)
*/
int maxPriority = -1;
ind.getOntology());
if(priority == 0)
return value;
else if(priority > maxPriority) {
}
}
return result;
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getProperty(org.mindswap.owl.OWLIndividual, org.mindswap.owl.OWLDataProperty, java.lang.String)
*/
ind.getOntology());
return value;
}
return null;
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getProperties(org.mindswap.owl.OWLIndividual, org.mindswap.owl.OWLDataProperty)
*/
return getAllDataValues(
ind.getOntology());
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getIncomingProperty(org.mindswap.owl.OWLObjectProperty, org.mindswap.owl.OWLIndividual)
*/
return getFirstIndividual(
ind.getOntology());
}
return getAllIndividuals(
ind.getOntology());
}
return getAllIndividuals(
null,
null,
new Map1(){
}),
ind.getOntology());
}
return getFirstIndividual(
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getIncomingProperties(org.mindswap.owl.OWLDataProperty, org.mindswap.owl.OWLIndividual)
*/
return getAllIndividuals(
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#hasProperty(org.mindswap.owl.OWLIndividual, org.mindswap.owl.OWLProperty)
*/
}
}
/* (non-Javadoc)
* @see org.mindswap.owl.OWLModel#getType(org.mindswap.owl.OWLIndividual)
*/
}
(Resource) c.getImplementation());
}
(Resource) c.getImplementation(),
}
(Resource) c.getImplementation(),
return null;
}
while(i.hasNext()) {
}
return set;
}
while(i.hasNext()) {
}
return set;
}
while(i.hasNext()) {
}
return set;
}
while(i.hasNext()) {
}
return list;
}
while(i.hasNext()) {
}
}
return null;
}
while(i.hasNext()) {
}
return list;
}
}
}
LOOP:
if( arg.isVariable() ) {
if( skipUnground )
continue LOOP;
else
}
}
}
else if(atom instanceof IndividualPropertyAtom) {
}
else if(atom instanceof DataPropertyAtom) {
}
else if(atom instanceof SameIndividualAtom) {
throw new NotImplementedException();
}
else if(atom instanceof DifferentIndividualsAtom) {
throw new NotImplementedException();
}
else
}
}
}
}
// assume that no expression body evaluates to true
return true;
}
throw new IllegalArgumentException(
}
else
}
if ( nodeVal.isBooleanRaw() )
return Node.createLiteral(Utils.calendarToXSDDateTimeString(nodeVal.getDate()), null, XSDDatatype.XSDdateTime) ;
throw new RuntimeException( "Unrecognized node type" );
}
// AtomList body = q.getBody();
// List resultVars = q.getResultVars();
if( argCount > 1 )
if(atom instanceof BuiltinAtom) {
if(argCount > 2) {
}
if( arg1.isConstant() ) {
if( arg2.isConstant() )
else
}
else {
if( arg2.isConstant() )
else
}
}
}
}
}
else
}
}
}
}
else
}
else
if( c != null )
constraints.add(c);
}
else {
}
else if(atom instanceof IndividualPropertyAtom)
else if(atom instanceof DataPropertyAtom)
else if(atom instanceof SameIndividualAtom)
else if(atom instanceof DifferentIndividualsAtom)
else
}
}
if( !constraints.isEmpty() ) {
}
}
// FIXME Set the result vars
sparql.setQueryResultStar( true );
// return sparql;
}
}
return query( q );
}
// Query sparql = makeJenaQuery( atoms );
// QueryExecution qe = QueryExecutionFactory.create( sparql, ontModel );
else {
}
}
}
}
return result;
}
// public List query(ABoxQuery query, ValueMap values) {
// List result = new ArrayList();
// List resultVars = query.getResultVars();
//// String rdqlStr = query.toRDQL();
// Query rdql = makeJenaQuery( query.getBody() );
// QueryEngine qe = new QueryEngine( rdql );
// qe.setDataSet( new DataSource1( ontModel ) );
//
// ResultBindingImpl initBinding = null;
// if( values != null || !values.isEmpty() ) {
// initBinding = new ResultBindingImpl();
//
// for(Iterator i = values.getVariables().iterator(); i.hasNext();) {
// Variable var = (Variable) i.next();
// OWLValue value = values.getValue( var );
//
// initBinding.add( var.getLocalName(), (RDFNode) value.getImplementation() );
// }
// }
//
// QueryResults results = qe.exec( initBinding );
// while(results.hasNext()) {
// ResultBinding binding = (ResultBinding) results.next();
// ValueMap map = new ValueMap();
// for(int i = 0; i < resultVars.size(); i++) {
// Variable var = (Variable) resultVars.get(i);
// String rdqlVar = var.getLocalName();
// RDFNode value = (RDFNode) binding.get(rdqlVar);
//
// if( value != null ) {
// OWLValue owlValue = null;
// if(value instanceof Literal)
// owlValue = new OWLDataValueImpl((Literal) value);
// else {
// Resource resource = (Resource) value;
// owlValue = new OWLIndividualImpl(baseOntology, resource);
// }
// map.setValue(var, owlValue);
// }
// }
// result.add(map);
// }
//
// return result;
// }
// FIXME datatype subsumption
}
return false;
}
public AnyOrder createAnyOrder(URI uri) { return createAnyOrder(createInstance(OWLS.Process.AnyOrder, uri)); }
public AtomicProcess createAtomicProcess() { return new AtomicProcessImpl(createInstance(OWLS.Process.AtomicProcess)); }
public AtomicProcess createAtomicProcess(URI uri) { return new AtomicProcessImpl(createInstance(OWLS.Process.AtomicProcess, uri)); }
public Choice createChoice(URI uri) { return createChoice(createInstance(OWLS.Process.Choice, uri)); }
public CompositeProcess createCompositeProcess() { return createCompositeProcess(createInstance(OWLS.Process.CompositeProcess)); }
public CompositeProcess createCompositeProcess(URI uri) { return createCompositeProcess(createInstance(OWLS.Process.CompositeProcess, uri)); }
return new CompositeProcessImpl(ind);
}
public Condition createSWRLCondition() { return new SWRLExpressionImpl(createInstance(OWLS.Expression.SWRL_Condition)); }
public Condition createSWRLCondition(URI uri) { return new SWRLExpressionImpl(createInstance(OWLS.Expression.SWRL_Condition, uri)); }
public Expression createSWRLExpression() { return new SWRLExpressionImpl(createInstance(OWLS.Expression.SWRL_Expression)); }
public Expression createSWRLExpression(URI uri) { return new SWRLExpressionImpl(createInstance(OWLS.Expression.SWRL_Expression, uri)); }
public ForEach createForEach(URI uri) { return createForEach(createInstance(OWLS.Process.ForEach, uri)); }
return new ForEachImpl(ind);
}
public Grounding createGrounding() { return createGrounding(createInstance(OWLS.Grounding.WsdlGrounding)); }
public Grounding createGrounding(URI uri) { return createGrounding(createInstance(OWLS.Grounding.WsdlGrounding, uri)); }
return new GroundingImpl(ind);
}
public IfThenElse createIfThenElse() { return new IfThenElseImpl(createInstance(OWLS.Process.IfThenElse)); }
public IfThenElse createIfThenElse(URI uri) { return new IfThenElseImpl(createInstance(OWLS.Process.IfThenElse, uri)); }
return new IfThenElseImpl(ind);
}
public Input createInput(URI uri) { return new InputImpl(createInstance(OWLS.Process.Input, uri)); }
public InputBinding createInputBinding() { return new InputBindingImpl(createInstance(OWLS.Process.InputBinding)); }
public InputBinding createInputBinding(URI uri) { return new InputBindingImpl(createInstance(OWLS.Process.InputBinding, uri)); }
return new WSDLMessageMapImpl(ind);
}
public MessageMap createWSDLInputMessageMap() { return createWSDLMessageMap(createInstance(OWLS.Grounding.WsdlInputMessageMap)); }
}
public MessageMap createWSDLOutputMessageMap() { return createWSDLMessageMap(createInstance(OWLS.Grounding.WsdlOutputMessageMap)); }
}
public MessageMap createUPnPMessageMap() { return createUPnPMessageMap(createInstance(FLAServiceOnt.UPnPMap)); }
}
return new UPnPMessageMapImpl(ind);
}
public Output createOutput(URI uri) { return new OutputImpl(createInstance(OWLS.Process.Output, uri)); }
public OutputBinding createOutputBinding() { return new OutputBindingImpl(createInstance(OWLS.Process.OutputBinding)); }
public OutputBinding createOutputBinding(URI uri) { return new OutputBindingImpl(createInstance(OWLS.Process.OutputBinding, uri)); }
public Perform createPerform(URI uri) { return new PerformImpl(createInstance(OWLS.Process.Perform, uri)); }
public Produce createProduce(URI uri) { return createProduce(createInstance(OWLS.Process.Produce, uri)); }
return new ProduceImpl(ind);
}
public Profile createProfile(URI uri) { return createProfile(createInstance(OWLS.Profile.Profile, uri)); }
return new ProfileImpl(ind);
}
public RepeatUntil createRepeatUntil() { return new RepeatUntilImpl(createInstance(OWLS.Process.RepeatUntil)); }
public RepeatUntil createRepeatUntil(URI uri) { return new RepeatUntilImpl(createInstance(OWLS.Process.RepeatUntil, uri)); }
return new RepeatUntilImpl(ind);
}
public RepeatWhile createRepeatWhile() { return new RepeatWhileImpl(createInstance(OWLS.Process.RepeatWhile)); }
public RepeatWhile createRepeatWhile(URI uri) { return new RepeatWhileImpl(createInstance(OWLS.Process.RepeatWhile, uri)); }
return new RepeatWhileImpl(ind);
}
public Result createResult(URI uri) { return new ResultImpl(createInstance(OWLS.Process.Result, uri)); }
public Sequence createSequence(URI uri) { return createSequence(createInstance(OWLS.Process.Sequence, uri)); }
return new SequenceImpl(ind);
}
public Service createService(URI uri) { return createService(createInstance(OWLS.Service.Service, uri)); }
return new ServiceImpl(ind);
}
public ServiceParameter createServiceParameter() { return createServiceParameter(createInstance(OWLS.Profile.ServiceParameter)); }
public ServiceParameter createServiceParameter(URI uri) { return createServiceParameter(createInstance(OWLS.Profile.ServiceParameter, uri)); }
return new ServiceParameterImpl(ind);
}
}
public SplitJoin createSplitJoin() { return createSplitJoin(createInstance(OWLS.Process.SplitJoin)); }
public SplitJoin createSplitJoin(URI uri) { return createSplitJoin(createInstance(OWLS.Process.SplitJoin, uri)); }
return new SplitJoinImpl(ind);
}
}
}
return new UPnPAtomicGroundingImpl(ind);
}
// added 15.4.2005 by Michael Daenzer
}
}
return new JavaAtomicGroundingImpl(ind);
}
public Grounding createJavaGrounding() { return createJavaGrounding(createInstance(MoreGroundings.JavaGrounding)); }
public Grounding createJavaGrounding(URI uri) { return createJavaGrounding(createInstance(MoreGroundings.JavaGrounding, uri)); }
return new GroundingImpl(ind);
}
// end added by Michael Daenzer
public ValueOf createValueOf(URI uri) { return new ValueOfImpl(createInstance(OWLS.Process.ValueOf, uri)); }
return new ValueDataImpl(dataValue);
}
}
}
return new WSDLAtomicGroundingImpl(ind);
}
}
}
}
}
}
}
}
switch(type) {
default:
break;
}
return null;
}
}
}
}
public boolean isLockSupported() {
return true;
}
}
}
}
}
return writer;
}
}
}
}
}
}