1 19 20 package com.hp.hpl.jena.ontology.impl; 23 24 25 import com.hp.hpl.jena.enhanced.*; 28 import com.hp.hpl.jena.graph.Node; 29 import com.hp.hpl.jena.ontology.*; 30 import com.hp.hpl.jena.rdf.model.Property; 31 32 33 42 public class IntersectionClassImpl 43 extends BooleanClassDescriptionImpl 44 implements IntersectionClass 45 { 46 49 52 57 public static Implementation factory = new Implementation() { 58 public EnhNode wrap( Node n, EnhGraph eg ) { 59 if (canWrap( n, eg )) { 60 return new IntersectionClassImpl( n, eg ); 61 } 62 else { 63 throw new ConversionException( "Cannot convert node " + n + " to IntersectionClass"); 64 } 65 } 66 67 public boolean canWrap( Node node, EnhGraph eg ) { 68 Profile profile = (eg instanceof OntModel) ? ((OntModel) eg).getProfile() : null; 70 return (profile != null) && 71 profile.isSupported( node, eg, OntClass.class ) && 72 AbstractProfile.containsSome( eg, node, profile.INTERSECTION_OF() ); 73 } 74 }; 75 76 77 80 83 91 public IntersectionClassImpl( Node n, EnhGraph g ) { 92 super( n, g ); 93 } 94 95 96 99 public Property operator() {return getProfile().INTERSECTION_OF();} 100 public String getOperatorName() {return "INTERSECTION_OF";} 101 102 103 106 110 } 111 112 113 142 | Popular Tags |